Howdy. So I'm trying to get the Tab widget working in my app, but having trouble getting widgets to display *in* the TabPanes.
I'm under the assumption I should:
1) Create a TabControl
2) Create TabPanes, calling TabControl->addTab()
3) Create widgets and add them to each TabPane by TabPane->addChildWindow()
The TabControl and TabPanes are being displayed okay, but the widgets in each tab are not. Am I missing something?
Second Question:
The TabControl->addTab() method takes in a Window*, not a TabPane*. Is there a reason for that? Can a TabControl really accept any type of Window?
Thanks for any tips!
TabControl and TabPane
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: TabControl and TabPane
Hi,
You do not need to create the TabPane yourself.
The advised way to do this is to layout your content for each pane on a DeafultWindow, and then simply add the DefaultWindow containing the widgets to the TabControl using the usual addChildWindow method. This will create a new pane within the tab control widget. The name button for the pane is taken from the window that you add (so in this example use setText on the DefaultWindow containing the widgets to whatever you want the button label to be).
You do not need to create the TabPane yourself.
The advised way to do this is to layout your content for each pane on a DeafultWindow, and then simply add the DefaultWindow containing the widgets to the TabControl using the usual addChildWindow method. This will create a new pane within the tab control widget. The name button for the pane is taken from the window that you add (so in this example use setText on the DefaultWindow containing the widgets to whatever you want the button label to be).
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: TabControl and TabPane
That's the ticket!
1) Create a TabControl
2) Create a DefaultWindow
3) defaultWindow->setText("tab name");
4) Add Windows to the DefaultWindow
5) TabControl->addChildWindow( defaultWindow )
6) repeat as required.
Thanks!
1) Create a TabControl
2) Create a DefaultWindow
3) defaultWindow->setText("tab name");
4) Add Windows to the DefaultWindow
5) TabControl->addChildWindow( defaultWindow )
6) repeat as required.
Thanks!
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 14 guests
