Kirix Support Forums

OnSize event propagation

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

OnSize event propagation

Postby Derrick on Tue Jan 31, 2006 6:11 pm

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.

Registered User
Posts: 1
Joined: Tue Jan 31, 2006 6:05 pm

Postby Ben on Wed Feb 01, 2006 8:20 am

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?

User avatar
Kirix Support Team
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby wyatt on Mon Feb 20, 2006 8:56 pm

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.

Registered User
Posts: 2
Joined: Tue Feb 07, 2006 8:40 pm

Return to wxAUI Questions, Thoughts & Feedback