TextCtrl fully expanding at program start

Vlastimil Brom vlastimil.brom at gmail.com
Fri Feb 27 09:14:49 EST 2009


2009/2/27 alex <alecla at bluewin.ch>:
> Hi all
> I have a gridsizer consisting of two vertically stacked panels, one
> with a StaticBox and the other with a TextCtrl.
> I would like that the TextCtrl expands at program start fully to the
> allocated panel size (lower panel of gridSizer).
> Instead of like now, fully expanding in the width but not exapnding in
> the height direction (two lines high).
...
>

Hi,
changing the proportion for adding the textctrl into the sizer to 1
should expand it to the lower half of the panel.

try changing:
        windowTwoSizer.Add(box2, 0, wx.ALL|wx.EXPAND, 0)
TO:
        windowTwoSizer.Add(box2, 1, wx.ALL|wx.EXPAND, 0)

See
http://www.wxpython.org/docs/api/wx.Sizer-class.html#Add
for the options for adding into the sizer.

hth
   vbr



More information about the Python-list mailing list