By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

wxPython (Flex)GridSizer Failing

P: n/a
Python v2.5
wxPython v2.8.3.0

I've got an app that has a wx.Panel managed by a FlexGridSizer. There
are 5 columns and 6 rows, all with StaticText widgets and all of
similar size. Everything works fine until I Clear and re-fill the
sizer a few times, then it puts all of the text in the upper-left
corner. I can clear/refill the grid to my hearts contents but it
doesn't fix itself. However, if I resize the main window the next
clear/refill will display correctly and _sometimes_ the current fill
will change and display correctly.

I have an identical panel directly below it (vertical box-sizer) with
the same number of columns but only 1 row and it never has a problem.
Both panels are identical because it's the same custom derived class
creating them and both are added to the box-sizer in an identical way.

I tried changing to an (un-flexible) GridSizer and got a different
display but the same problem. If anything, it occurs sooner.

Any ideas on what is happening?

-- Brian

Apr 27 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Apr 27, 1:45 pm, "bcwh...@pobox.com" <bcwh...@pobox.comwrote:
Python v2.5
wxPython v2.8.3.0

I've got an app that has a wx.Panel managed by a FlexGridSizer. There
are 5 columns and 6 rows, all with StaticText widgets and all of
similar size. Everything works fine until I Clear and re-fill the
sizer a few times, then it puts all of the text in the upper-left
corner. I can clear/refill the grid to my hearts contents but it
doesn't fix itself. However, if I resize the main window the next
clear/refill will display correctly and _sometimes_ the current fill
will change and display correctly.

I have an identical panel directly below it (vertical box-sizer) with
the same number of columns but only 1 row and it never has a problem.
Both panels are identical because it's the same custom derived class
creating them and both are added to the box-sizer in an identical way.

I tried changing to an (un-flexible) GridSizer and got a different
display but the same problem. If anything, it occurs sooner.

Any ideas on what is happening?

-- Brian
It sounds kind of like your app isn't redrawing correctly or your not
calling the sizer's Fit() method after re-filling it. You might try
that. Also, I highly recommend posting wxPython questions to their
users group. They are usually quite helpful and knowledgeable:
http://www.wxpython.org/maillist.php

Mike

Apr 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.