Hiding Panels

I have a column in a FlexGridSizer with several panels. I am able to show/hide the panels as needed. However, when I hide a panel in the middle of the column, I would expect that the other panels would move up into the empty space but they are not. I used wxFormBuilder to build the form and if I click on the hidden box for one of those panels in that program, it behaves just as I would expect. Is there something else that I need to be doing after panel.Hide()?

Wouldn’t that require that panels change their grid position?
I don’t think that is an automatic function. You just have a grid with an unshown object in it.

···

On 4/5/2015 11:48 AM, gpraceman wrote:

    I have a column in a FlexGridSizer with several

panels. I am able to show/hide the panels as needed. However,
when I hide a panel in the middle of the column, I would expect
that the other panels would move up into the empty space but
they are not. I used wxFormBuilder to build the form and if I
click on the hidden box for one of those panels in that program,
it behaves just as I would expect. Is there something else that
I need to be doing after panel.Hide()?

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

parent_of_the_panels.Layout()

···

On Sun, Apr 5, 2015 at 11:48 AM, gpraceman <gpraceman@gmail.com> wrote:

I have a column in a FlexGridSizer with several panels. I am able to
show/hide the panels as needed. However, when I hide a panel in the middle
of the column, I would expect that the other panels would move up into the
empty space but they are not. I used wxFormBuilder to build the form and
if I click on the hidden box for one of those panels in that program, it
behaves just as I would expect. Is there something else that I need to be
doing after panel.Hide()?

@Rufus
All of the panels are in the same grid cell.

@Che M
Thanks, panel.GetParent().Layout() worked.