[wxPython-users] wx.SplitterWindow not resizing with parent Frame
?
Saketh Bhamidipati
saketh.bhamidipati at gmail.com
Tue Jun 27 15:13:12 PDT 2006
On 6/27/06, Anders Wallin <anders.wallin at helsinki.fi> wrote:
>
>
> Hi group,
>
> I'm trying to use a wx.SplitterWindow - the code from Rappin's book
> works OK for me, but when I try to do the same thing in my own program I
> do get the splitterwindow and two Panels, but the splitterwindow and the
> panels do not resize when I resize the surrounding Frame. As far as I
> can tell my code is fairly identical to the example code but still
> functions differently...
> Any ideas ?
>
> AW
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
> Do you use sizers with wx.EXPAND?
Here is the code in my application that makes a splitter window that expands
with two Panels - see if it helps. It is in a class derived from wx.Frame. I
omitted the parts where I added the controls to the panels.
# Splitter
self.splitter =3D wx.SplitterWindow(self, style =3D wx.SIMPLE_BORDER)
# Left panel
self.lpanel =3D wx.Panel(self.splitter, -1, style =3D wx.SUNKEN_BORDER)
# Left sizer
lbox =3D wx.BoxSizer(wx.VERTICAL)
lbox.Add(self.tree, 1, wx.EXPAND)
self.lpanel.SetSizer(lbox)
# Right panel
self.rpanel =3D wx.Panel(self.splitter, -1, style =3D wx.SUNKEN_BORDER)
# Right sizer
rbox =3D wx.BoxSizer(wx.VERTICAL)
rbox.Add(self.control, 1, wx.EXPAND)
self.rpanel.SetSizer(rbox)
# Split the window vertically
self.splitter.SplitVertically(self.lpanel, self.rpanel, 200)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200606=
27/6596336f/attachment.htm
More information about the wxpython-users
mailing list