I noticed that wxAUI determines sizes based upon sizers and frame size.
wxAUI captures the sizes using OnSize event handlers on the frames containing the windows. The problem is that OnSize events do not propigate from child to parent windows. As a result the sizes are never updated.
This is causing problems for me since my child windows initially use a size of wxDefaultSize which makes everything incrediably small on intial docking or floating.
You can see this in the Win32 example. Regardless of how much you resize in docked or floating mode, the window will always redock at the same size or undock at the same size.
Derrick
Kirix Support Forums
OnSize event propagation
3 posts
• Page 1 of 1
Hi Derrick,
If I've understood you correctly, then the solution is simple. All you need to do is specify your starting size using the BestSize() setting on wxPaneInfo. That will allow you to continue using wxDefaultSize on your pane, while specifying an appropriate starting size for the floating/docked pane.
Will this work for you?
Best,
Ben
If I've understood you correctly, then the solution is simple. All you need to do is specify your starting size using the BestSize() setting on wxPaneInfo. That will allow you to continue using wxDefaultSize on your pane, while specifying an appropriate starting size for the floating/docked pane.
Will this work for you?
Best,
Ben
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
Hi Ben,
Using BestSize does indeed solve the tiny-windows problem, however undocking a window will always return it to its "best size" rather than its "current" size. That is, the floating_size variable is never updated and remains wxDefaultSize even after the window is resized, despite the "pane.floating_size = size;" line in OnFloatingPaneResized.
This also results in floating panes' sizes not being saved by SavePerspective, which is the bigger problem for me.
-wyatt
Using BestSize does indeed solve the tiny-windows problem, however undocking a window will always return it to its "best size" rather than its "current" size. That is, the floating_size variable is never updated and remains wxDefaultSize even after the window is resized, despite the "pane.floating_size = size;" line in OnFloatingPaneResized.
This also results in floating panes' sizes not being saved by SavePerspective, which is the bigger problem for me.
-wyatt
- wyatt
- Registered User
- Posts: 2
- Joined: Tue Feb 07, 2006 8:40 pm
3 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback