Kirix Support Forums

Toolbar size when restoring a perspective, and more tools?

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

Toolbar size when restoring a perspective, and more tools?

Postby benedicte on Wed Oct 18, 2006 3:14 am

Hello,

Is it possible to make a toolbar larger than the size saved in the perspective, if it needs more space than when the perspective was saved?

I mean, I have an app with multiple toolbars, and I save the perspective when closing the app. But when reloading, I may have added tools to the toolbars (new version of the app), and I wish the toolbars to be resized so as to respect the needed size, without loosing the docking/position info.

Is it possible?

Regards,
Bénédicte

wxWidgets 2.6.3 + wxAUI 0.92
benedicte
Registered User
 
Posts: 5
Joined: Fri Jun 09, 2006 3:23 am
Location: Paris, France

Postby Ben on Sat Oct 21, 2006 3:17 am

Hello,

Yes. You can do this. After calling LoadPerspective(), iterate through all the panes and add whatever buffer space you need to the toolbar panes. You can identify the toolbar panes in many different ways: the first way is setting pane names that you know, the second way is calling wnd->IsKindOf(CLASSINFO(wxToolBar)) to identify your toolbars. Next, you can call GetMinSize from the toolbar, which should have adjusted it's minsize if you added controls. Finally, call frame manager's update.

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

Return to wxAUI Questions, Thoughts & Feedback