abraham@hugin.dk (Per Abrahamsen) (04/30/91)
Here is how I implement a Property Window in the same style as the olwm's "Workspace Properties" window (see also "OPEN LOOK GUI Application Style Guidelines", page 268): - Use the frame's original panel for the "Category:" item. - Create a separate panel for each category. Use XV_SHOW to hide the panels, and WIN_BELOW to place them below the original panel. - Show the default category, and use window_fit to make the frame fit the default category. - Calculate the difference in size between the default category's panel and the frame (say delta_x and delta_y) by comparing their XV_WIDTH and XV_HEIGHT attributes. - When the user choose a new category, use XV_SHOW to hide the old panel and to display the new panel. - Adjust the size of the frame by setting the XV_HEIGHT and XV_WIDTH attributes to the height and width of the new panel adjusted by the delta_x and delta_y values. If you don't care about the -scale option, you can hardcode delta_x and delta_y instead of calculating them.