wxPython (Flex)GridSizer Failing

B

bcwhite

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
 
K

kyosohma

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top