I've searched through the forums, I tried to check the source and API and I even tried out what CE said to try to do with the defaultwindows, but for the life of me i can't get the tabbing to work properly.
I'm tring to make tabs in a framewindow and everything thing i try comes out all wrong. The Layout editor isn't helping me through this either.
If someone can give me some xml or some code to try to base myself on, it'll be appreciated.
A working tab
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: A working tab
Consider the following....
HTH
CE.
Code: Select all
<?xml version="1.0" ?>
<GUILayout>
<Window Type="DefaultWindow" Name="root">
<!--
This creates the TabControl itself, just set the size and position
as you would for other widgets
-->
<Window Type="TaharezLook/TabControl" Name="demoTabControl">
<Property Name="Position" Value="x:0.2 y:0.2" />
<Property Name="Size" Value="w:0.6 h:0.6" />
<!--
Here we embed a 'DefaultWindow' which will become the first page
of the tab control content. The text "Tab-1" will be set into
the tab button at the top of the parent tab control
-->
<Window Type="DefaultWindow" Name="ContentPage1">
<Property Name="Text" Value="Tab-1" />
<!--
Everything embedded on this DefaultWindow will appear
as content on this page in the tab control. In this
case, a simple button.
-->
<Window Type="TaharezLook/Button" Name="button1">
<Property Name="Position" Value="x:0.25 y:0.2" />
<Property Name="Size" Value="w:0.5 h:0.2" />
<Property Name="Text" Value="Sample Button!" />
</Window>
</Window>
<!--
Another 'DefaultWindow' which will become the second page
of the tab control content. Again, you can see the text
"Tab-2" which will be used as the label on the button for
this pane.
-->
<Window Type="DefaultWindow" Name="ContentPage2">
<Property Name="Text" Value="Tab-2" />
<!--
This tab page just contains an editbox.
-->
<Window Type="TaharezLook/Editbox" Name="editbox">
<Property Name="Position" Value="x:0.25 y:0.2" />
<Property Name="Size" Value="w:0.5 h:0.3" />
<Property Name="Text" Value="Some editable text!" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>
HTH
CE.
Re: A working tab
I copy pasted the layout you just posted. Nothing appears on screen...
I was trying to place the tab control in a framewindow (that was my original intention), that didn't work so i just used the exact layout you gave an example of and the only thing I get is nothing. Nothing shows on screen, I'm looking over the imageset right now and everything seems to be there and in place...
I was trying to place the tab control in a framewindow (that was my original intention), that didn't work so i just used the exact layout you gave an example of and the only thing I get is nothing. Nothing shows on screen, I'm looking over the imageset right now and everything seems to be there and in place...
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: A working tab
I messed up the Size property specifications. I've edited the example XML and it will probably work now
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: A working tab
works now
Re: A working tab
Does this work with Falagard? I tried it and got errors:
06/12/2005 13:04:53 (InfL1) XercesParser::initialiseSchema - Attempting to load schema from file 'GUILayout.xsd'.
06/12/2005 13:04:53 (InfL1) XercesParser::initialiseSchema - XML schema file 'GUILayout.xsd' has been initialised.
06/12/2005 13:04:53 (Error) Exception: WindowManager::getWindow - A Window object with the name 'BuildBuild/TabControl__auto_TabPane__Buttons' does not exist within the system
06/12/2005 13:04:53 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/TabControl' objects.
06/12/2005 13:04:53 (Error) XercesParser::parseXMLFile - An unexpected error occurred while parsing XML file 'Build.layout'.
06/12/2005 13:04:53 (Error) WindowManager::loadWindowLayout - loading of layout from file 'Build.layout' failed.
It's been about a month or so since I updated to CVS, if that matters.
06/12/2005 13:04:53 (InfL1) XercesParser::initialiseSchema - Attempting to load schema from file 'GUILayout.xsd'.
06/12/2005 13:04:53 (InfL1) XercesParser::initialiseSchema - XML schema file 'GUILayout.xsd' has been initialised.
06/12/2005 13:04:53 (Error) Exception: WindowManager::getWindow - A Window object with the name 'BuildBuild/TabControl__auto_TabPane__Buttons' does not exist within the system
06/12/2005 13:04:53 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/TabControl' objects.
06/12/2005 13:04:53 (Error) XercesParser::parseXMLFile - An unexpected error occurred while parsing XML file 'Build.layout'.
06/12/2005 13:04:53 (Error) WindowManager::loadWindowLayout - loading of layout from file 'Build.layout' failed.
It's been about a month or so since I updated to CVS, if that matters.
Re: A working tab
Patch 1391727 at SF fixes this in CVS head.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 1 guest