Author: reinhard
Date: 2007-04-09 15:45:46 -0500 (Mon, 09 Apr 2007)
New Revision: 9468
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/vbox.py
Log:
Do not use stretch factors in AddGrowableRow because wx assignes the whole
space according to that stretch factor instead of only the extra space.
This fixes a lot of strange effects when resizing a form containing hboxes
within vboxes.
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/vbox.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/vbox.py 2007-04-09 20:41:46 UTC (rev 9467)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/vbox.py 2007-04-09 20:45:46 UTC (rev 9468)
@@ -85,7 +85,11 @@
self._sizer.Add(item, pos, span, wx.EXPAND)
if add and ui_widget.growable:
- self._sizer.AddGrowableRow(self.last_item, ui_widget.stretch)
+ # FIXME: If a stretch factor is used, the *whole* newly calculated
+ # size is distributed according to this stretch factor, instead of
+ # only the extra space.
+ # self._sizer.AddGrowableRow(self.last_item, ui_widget.stretch)
+ self._sizer.AddGrowableRow(self.last_item)
self.last_item += add
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.