Kirix Support Forums

Callback on Docking

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

Callback on Docking

Postby mihok on Tue Mar 16, 2010 11:19 am

Does the user have access to any callback when a pane is moved from one location to another and a docking occurs? If so, could someone please provide the details?

I have several panes visible, but one of them contains a computationally-intensive process. If I try to move a pane from one location to another and dock it in the new location, it will not succeed if the process is actively running. However, if I pause the process and then move the pane, everything is fine. I would like to simply put the pause, dock, resume sequence in a callback so that my users don't have to do this manually every time they want to move something. Any help would be greatly appreciated.
mihok
Registered User
 
Posts: 1
Joined: Tue Mar 16, 2010 10:58 am

Re: Callback on Docking

Postby Ben on Wed Mar 17, 2010 8:20 am

I'm sorry there is not a real wxEvent for this. There should be.

However, it turns out you still can do what you want to do. It's not hard and is relatively clean.

Derive a tiny class from wxAuiManager and simply override the following function:
Code: Select all
virtual bool ProcessDockResult(wxAuiPaneInfo& target,
                                   const wxAuiPaneInfo& new_pos);


Returning false from this function will prevent the move from happening, if I recall correctly. Otherwise, make sure to call the base class function to let it do its default processing.

All the best,
Ben
Ben Williams
Kirix Support Team
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback