I have a split panel with a bunch of box sizers. There is gotta be a way to
click a button, and another box sizer appears just as the init sets
the sizers. Adding to the frame. Is this possible? See my sketch.
panel = wx.Panel(self.LeftSideOfYourSketchPanel)
···
On Wed, Oct 30, 2013 at 9:57 PM, George McCown georgemccown@gmail.com wrote:
I have a split panel with a bunch of box sizers. There is gotta be a way to
click a button, and another box sizer appears just as the init sets
the sizers. Adding to the frame. Is this possible? See my sketch.
First, don’t you really want a panel to appear, not a sizer? You want that panel to have a sizer that will manage the stuff inside it, but you don’t just want a sizer, right?
Did you try just creating the panels when you click?, like:
def OnButtonClick(self,event):
Hi George,
I have a split panel with a bunch of box sizers. There is gotta be a way
to
click a button, and another box sizer appears just as the _init_ sets
the sizers. Adding to the frame. Is this possible? See my sketch.
As Che points out you want a panel or another container/widget and not just a sizer.
In other words a sizer is not visible, it just manages the layout. You need a widget which is visible and manage it with a sizer.
First, don't you really want a *panel* to appear, not a sizer? You want
that panel to have a sizer that will manage the stuff inside it, but you
don't *just* want a sizer, right?Did you try just creating the panels when you click?, like:
def OnButtonClick(self,event):
panel = wx.Panel(self.LeftSideOfYourSketchPanel)
you probably also need to:
self.LeftSideOfYourSketchPanel.GetSizer().Add(panel)
or something along this line.
Werner
···
On 31/10/2013 05:23, C M wrote:
On Wed, Oct 30, 2013 at 9:57 PM, George McCown <georgemccown@gmail.com> > wrote:
Hi George,
I have a split panel with a bunch of box sizers. There is gotta be a way
to
click a button, and another box sizer appears just as the init sets
the sizers. Adding to the frame. Is this possible? See my sketch.
As Che points out you want a panel or another container/widget and not
just a sizer.In other words a sizer is not visible, it just manages the layout. You
need a widget which is visible and manage it with a sizer.First, don’t you really want a panel to appear, not a sizer? You want
that panel to have a sizer that will manage the stuff inside it, but you
don’t just want a sizer, right?
Did you try just creating the panels when you click?, like:
def OnButtonClick(self,event):
panel = wx.Panel(self.LeftSideOfYourSketchPanel)
you probably also need to:
self.LeftSideOfYourSketchPanel.GetSizer().Add(panel)
or something along this line.
Werner
Yup, thats what I’ll work on. Thank you.
···
On Thursday, October 31, 2013 2:16:32 AM UTC-5, werner wrote:
On 31/10/2013 05:23, C M wrote:
On Wed, Oct 30, 2013 at 9:57 PM, George McCown george...@gmail.com > > > wrote: