TextCtrl fully expanding at program start

alex alecla at bluewin.ch
Fri Feb 27 13:39:55 EST 2009


On 27 Feb., 15:14, Vlastimil Brom <vlastimil.b... at gmail.com> wrote:
> 2009/2/27 alex <ale... 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)
>
> Seehttp://www.wxpython.org/docs/api/wx.Sizer-class.html#Add
> for the options for adding into the sizer.
>
> hth
>    vbr

Hi Vlastimil
I must have overlooked it. Too much reading and trying...
Thank you, it works perfect.

Regards Alex



More information about the Python-list mailing list