1) Is there a way yet to get a signal from a LAYOUT_WeightBar like with WMHI_GADGETUP? I want to know when the user resized the panes so I can update some stuff.
2) In my layout I have a horizontal group separated by vertical LAYOUT_WeightBar for left/right sizing. I tried putting another LAYOUT_WeightBar below that group for up/down sizing. It won't move. Is this possible?
-------------------------------- | | | | | | | | | <--- weightbar in center left/right | | | | | | -------------------------------- <--- weightbar up/down | | | | --------------------------------
3) The weightbar for the top section will accept WeightedWidth sizes if there is 1 gadget on each side (same horizontal group). If I try to put 2 on the right side stacked, it always splits the 2 sides 50/50, even though I am giving it a WeightedWidth size. Using a group "breaks" it.
This works fine:
StartHGroup, Gadget1, WeightedWidth,25, WeightBar, Gadget2, WeightedWidth,75, EndHGroup,
This does not:
StartHGroup, Gadget1, WeightedWidth,25, WeightBar, StartVGroup, Gadget2, Gadget3, WeightedWidth,75, EndVGroup, EndHGroup,
It makes both sides 50/50.
In the second version you are setting the weighted width for Gadget3 inside the VGroup, which is a no-op since there is nothing else that uses horizontal space in there as it's a vertical group. You want to set it for the VGroup instead.
That was it! I didn't know you could use CHILD_ tags on the groups. Thank you!
Actually you should not need this. Every gadget in the resized area is automatically resized and redrawn by each gadget's respective GM_LAYOUT and GM_RENDER method.
If you have custom graphics, you should embed it into a space.gadget with a SPACE_RenderHook. Then your graphics will be redrawn automatically, too.
If you need more control, for example mouse clicks into your custom area, you could make your own gadget class. Then you have full control over every aspect of the gadget.
The weight bar can only be moved if the parts on both sides of the bar are resizable. If one side holds only gadgets with fixed size, then the bar cannot be moved.
In your drawing the area below the up/down bar looks like a group with ok / cancel buttons. Such a group usually has the LAYOUT_FixedVert attribute set to FALSE. In this case the group cannot be resized vertically and the bar won't move.
The same applies to the window's size gadget. If the window contains only gadgets / groups with a fixed width, the size gadget won't move horizontally and if all gadgets have a fixed height, the size won't change vertically.
Layout groups are gadget objects like any other. From the parent group's point of view, the child group is just another member. It does not know nor care whether it is a usual gadget or another group.