I have a custom class extending Panel for drawing lines, which shows an
400-value array being sorted. The application does 6 at a time and so
there is a Panel (“gridPanel”) with a 2x3 GridSizer managing them. Each
cell contains another Panel (“arrayBorderPanel”) with a 2x1
FlexGridSizer. The top row holds a Panel (“drawPanel” – a 1x1
GridSizer) with the custom panel centered in it, and the bottom holds
several StaticTexts in a Panel (“infoPanel”) with 1x3 FlexGridSizer.
The column and the top row of each arrayBorderPanel are growable. The
infoPanels have growable columns but not rows.
The frame expands correctly, with the column of the arrayBorderPanel
expanding horizontally but only the top row growing vertically, and the
custom panels auto-center. The problem is when the frame is decreased
below the original size. In other guis I’ve used the drawPanels shrink
vertically but the infoPanels stay fixed.
With WxRuby the infoPanels are the first to disappear. I need these to
stay put. Right now both drawPanels and infoPanels are added to sizers
with a proportion of 0 and the EXPAND flag. I’ve tried giving one or
the other a proportion of 1 and/or removing the EXPAND flag from the
infoPanel sizer but this doesn’t change anything. I have tried
set_min_size on the infoPanel but no change there either. It does work
with I set the min size on the infoPanels to the size it needs (about
100x15) while setting the min size on the drawPanels to something
smaller than it needs (like 10x10), but then Frame.fit doesn’t work
right any more. I suppose I could figure out how big it should be and
set the frame size manually, but that wouldn’t be very portable.
Any help appreciated.