[wxPython-users] Re: Make form only resizable horizontally?

Raffaello Barella barbarossa.platz at gmail.com
Wed Jan 9 00:34:24 PST 2008


Thanks for your thanks. But Robin's solution is cooler.

2008/1/9, Kelie <kf9150 at gmail.com>:
>
> Raffaello Barella <barbarossa.platz <at> gmail.com> writes:
>
> > Yes.Store in a variant in __init__  the vertical size you want to
> maintain,
> and intercept the event wx.EVT_SIZE.     def __init__ (self):
> self.VertSize =3D 500           self.Bind(wx.EVT_SIZE, self.OnSize
> > )     def OnSize(self, event):           event.Skip()           sz =3D
> event.GetSize()           if sz.height !=3D self.VertSize:
> sz.height =3D self.VertSize                self.SetSize
> > (sz)Bye.
> >
>
> Thanks for your help Raffaello. That worked.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200801=
09/53e1b415/attachment.htm


More information about the wxpython-users mailing list