hiding and showing widgets and there position

1,241 views
Skip to first unread message

johnf

unread,
Aug 1, 2019, 10:06:21 AM8/1/19
to wxpytho...@googlegroups.com

Hi,

In the past I was able to hide a control/widget in a panel and refresh the layout and the other controls/widgets would fill in the panel as if the hidden control/widget was not there.  Of course I am using sizers.

Is that still true?

For example if I created a panel containing three (3) wx.StaticText boxes and showed the panel the three would appear.  If I hide the first wx.StaticText box and call a layout refresh the remaining two (2) would fill the space as if the first (1st) wx.StaticText was never there.  In testing the simple case appears to work as expected but as I add many more sizers and panels to a frame I find that the positioning of the controls within a panel does NOT move as it use to with wxPython 3.x.  It's almost as if the there is some sort of remaining part of the hidden control that is present in the panel that causes the layout to reposition the remaining controls just off by some small amount.

So again is the assumption still valid?


Johnf

Robin Dunn

unread,
Aug 1, 2019, 1:23:02 PM8/1/19
to wxPython-users
On Thursday, August 1, 2019 at 7:06:21 AM UTC-7, johnf wrote:

So again is the assumption still valid?


It should be. Can you create a small sample that demonstrates the problem?

Robin

johnf

unread,
Aug 1, 2019, 5:12:57 PM8/1/19
to wxpytho...@googlegroups.com

That's what I wanted to hear!  Therefore, it has something to do with the way I am hiding and showing the controls.  If can't fix the issue I will repost with an example.

Johnf

--
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/24ece458-0978-4376-87b9-88eb09e19d03%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages