Panel only fills on frame resize

Hello,

I currently have a Frame that has a panel, and in that panel there is a sizer. When the panel is “shown” everything is set to “Fit” in that the sizer has not expanded to fill the entire panel. However when the frame is resized the objects go to where they should be. It is a little hard to explain but i created a little video that explains my situation a bit better so hopefully that will provide more information. The code is rather long and complicated and simply pasting a block of code wont really help, if you need the code it would take me a bit to get it ready. So hopefully from the video you can tell whats up. http://www.youtube.com/watch?v=7pkWgvXOTI0

Thanks

~Cody

Have you called the method Layout()

···

On Saturday, June 15, 2013 10:53:45 AM UTC+1, Cody wrote:

Hello,

I currently have a Frame that has a panel, and in that panel there is a sizer. When the panel is “shown” everything is set to “Fit” in that the sizer has not expanded to fill the entire panel. However when the frame is resized the objects go to where they should be. It is a little hard to explain but i created a little video that explains my situation a bit better so hopefully that will provide more information. The code is rather long and complicated and simply pasting a block of code wont really help, if you need the code it would take me a bit to get it ready. So hopefully from the video you can tell whats up. http://www.youtube.com/watch?v=7pkWgvXOTI0

Thanks

~Cody

Yes, sorry; i probaly should have included what i tried.

I have called: self.Update(), self.Layout(), self.Refresh()

~Cody

···

On Sat, Jun 15, 2013 at 7:46 AM, Yoriz oldknackers@googlemail.com wrote:

Have you called the method Layout()

On Saturday, June 15, 2013 10:53:45 AM UTC+1, Cody wrote:

Hello,

I currently have a Frame that has a panel, and in that panel there is a sizer. When the panel is “shown” everything is set to “Fit” in that the sizer has not expanded to fill the entire panel. However when the frame is resized the objects go to where they should be. It is a little hard to explain but i created a little video that explains my situation a bit better so hopefully that will provide more information. The code is rather long and complicated and simply pasting a block of code wont really help, if you need the code it would take me a bit to get it ready. So hopefully from the video you can tell whats up. http://www.youtube.com/watch?v=7pkWgvXOTI0

Thanks

~Cody

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/groups/opt_out.

Without showing any code, the fix is a needle in a haystack.

···

On Saturday, June 15, 2013 10:53:45 AM UTC+1, Cody wrote:

Hello,

I currently have a Frame that has a panel, and in that panel there is a sizer. When the panel is “shown” everything is set to “Fit” in that the sizer has not expanded to fill the entire panel. However when the frame is resized the objects go to where they should be. It is a little hard to explain but i created a little video that explains my situation a bit better so hopefully that will provide more information. The code is rather long and complicated and simply pasting a block of code wont really help, if you need the code it would take me a bit to get it ready. So hopefully from the video you can tell whats up. http://www.youtube.com/watch?v=7pkWgvXOTI0

Thanks

~Cody

Cody Woolaver wrote:

Hello,

I currently have a Frame that has a panel, and in that panel there is a
sizer. When the panel is "shown" everything is set to "Fit" in that the
sizer has not expanded to fill the entire panel. However when the frame
is resized the objects go to where they should be. It is a little hard
to explain but i created a little video that explains my situation a bit
better so hopefully that will provide more information. The code is
rather long and complicated and simply pasting a block of code wont
really help, if you need the code it would take me a bit to get it
ready. So hopefully from the video you can tell whats up.
http://www.youtube.com/watch?v=7pkWgvXOTI0

Using the WIT is a good way to help figure out layout problems. http://wiki.wxpython.org/Widget_Inspection_Tool It will let you see the various size-related properties of the widgets and their sizers, their parent/child containment hierarchy, etc. and also have a interactive interpreter prompt that will let you call methods or change properties to help you experiment with and find what might fix your layout.

···

--
Robin Dunn
Software Craftsman

WIT is badly broken in Phoenix. I am in the process of making a pull request to RobinD42/Phoenix repo after I do all the needed fixes.

Check you heirarchies: meaning make sure all your controls are child of the correct panel and not the frame; as well make sure your widgets are added to correct sizers and that all your sizers are added to the correct panel; meaning if you add a widget to panelA make sure the sizer is owned directly or indirectly of panelA and not the wrong panel or even the frame.

···

On Sat, Jun 15, 2013 at 3:56 PM, Boštjan Mejak mejak.bost@gmail.com wrote:

WIT is badly broken in Phoenix. I am in the process of making a pull request to RobinD42/Phoenix repo after I do all the needed fixes.

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/groups/opt_out.