[wxPython-users] Make form only resizable horizontally?

Raffaello Barella barbarossa.platz at gmail.com
Tue Jan 8 12:20:32 PST 2008


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.



2008/1/8, Kelie <kf9150 at gmail.com>:
>
> Hello,
>
> Is there a way to make a form only resizable horizontally, not vertically?
>
> Thanks,
>
> kelie
>
> ---------------------------------------------------------------------
> 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=
08/1bbe3e82/attachment.htm


More information about the wxpython-users mailing list