I'm trying to understand how I can implement some basic operations with wxAuiNotebook
like splitting n-tabs in 1/n total width horizontal or vertical tabs (for example automatically split the window with 3 vertical tabs 1/3 of the window width each).
I think I can do it using SetDockSizeConstraint and Split
But what about revrting the process i.e. taking back the tabs full-window one above the other???
Something like Join(page, onPage) ???
Thanks for your support!
Kirix Support Forums
wxAuiNotebook - Reverse Split()
3 posts
• Page 1 of 1
- neurino
- Registered User
- Posts: 2
- Joined: Thu Jan 22, 2009 9:27 am
Re: wxAuiNotebook - Reverse Split()
Ok, I got how to restore tabs but now:
what about dividing equally window width/height while splitting multiple tabs (like 1/3widht with 3 vertical tabs???)
Thanks for the support
what about dividing equally window width/height while splitting multiple tabs (like 1/3widht with 3 vertical tabs???)
- Code: Select all
def restoreTabs(self):
'restores original view after Tab Splits'
#remember the tab now selected
nowSelected = self.notebook.GetSelection()
#select first tab as destination
self.notebook.SetSelection(0)
#iterate all other tabs
for idx in xrange(1, self.notebook.GetPageCount()):
#get win reference
win = self.notebook.GetPage(idx)
#get tab title
title = self.notebook.GetPageText(idx)
#remove from notebook
self.notebook.RemovePage(idx)
#re-add in the same position so it will tab
self.notebook.InsertPage(idx, win, title)
#restore orignial selected tab
self.notebook.SetSelection(nowSelected)
Thanks for the support
- neurino
- Registered User
- Posts: 2
- Joined: Thu Jan 22, 2009 9:27 am
Re: wxAuiNotebook - Reverse Split()
I don't know that there is any programmatic way of doing that. I believe that right now it's all user-controlled. I'd be happy for API suggestions.
Ben
Ben
Ben Williams
Kirix Support Team
Kirix Support Team
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
3 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback