I think the easiest way to accomplish what you want is to add a dummy element (“Spacer”) with size (0,0) and proportoion 1 to your sizer (see code below). This works especially well if all other elements have a proportion of 0.
add calendar to sizer here
self.panel_sizer.Add((0,0), 1, wx.EXPAND)
add gauge to sizer here
···
On Saturday, July 12, 2014 12:18:20 PM UTC+2, steve wrote:
Hi,
I have a panel, and I use a vertical box sizer to place widgets on it. I would like to place a gauge bar on the bottom side of the panel:
I’ve had good luck drawing GUI designs on paper by hand, then folding the paper or drawing lines at equal spacings. If I did that to your desired picture that you posted… I think I would have a vertical sizer with the top widgets, then place that in another vertical sizer, add two spacers to that (mySizer.AddStretchSpacer(1)), then add the progress Gauge with wx.ALIGN_BOTTOM.
···
On Saturday, July 12, 2014 3:18:20 AM UTC-7, steve wrote:
Hi,
I have a panel, and I use a vertical box sizer to place widgets on it. I would like to place a gauge bar on the bottom side of the panel:
I’ve had some time to mull it over, and I think the problem is the wx.ALIGN_* flags do not align the widget within the overall spacer, but rather within the area the spacer allocates for the widget. Therefore you’ll only see the effect if the space allocated for that widget is larger than the widget itself.
If all your widgets are put in with proportion 0, they will just be put in “sequentially” whether horizontal or vertical, at their size. And won’t be resized or moved.
Try Add’ing all the widgets into the spacer with proportion 1, expand the frame and see what happens…
···
On Saturday, July 12, 2014 6:18:20 AM UTC-4, steve wrote:
Hi,
I have a panel, and I use a vertical box sizer to place widgets on it. I would like to place a gauge bar on the bottom side of the panel: