[wxPython-users] Removing components from a gridbagsizer
Julian Swartz
swartzjp at gmail.com
Thu Jun 1 04:51:21 PDT 2006
Thanks! Works like a charm.
On 01/06/06, Peter Decker <pydecker at gmail.com> wrote:
>
> On 6/1/06, Julian Swartz <swartzjp at gmail.com> wrote:
> > That doesn't work. Consider the test program below. I have a
> GridBagSizer
> > managing a 2x2 grid containing 2 buttons and 2 StaticText labels. I want
> to
> > be able to make button 2 disappear by clicking button 1, but when I use
> the
> > Detach method, nothing happens. If I add the line self.sizer.Layout() to
> the
> > end of the button_clicked() method, button 2 is still visible and the
> items
> > merely get realigned in the grid.
>
> Oh, you want to get rid of the items. I thought you only wanted to
> remove them from the grid. Can't you just call button.Show(False),
> followed by grid.Layout()?
>
> --
>
> # p.d.
>
> ---------------------------------------------------------------------
> 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/200606=
01/36376a14/attachment.htm
More information about the wxpython-users
mailing list