[SOLVED]TabControl without a defined visible child
Posted: Sun Oct 04, 2009 23:32
Hi all!
I'm using CEGUI 0.7 with Ogre 1.6.3. I'm not sure if this is intended or a bug. If I have a TabControl widget with child tabs and none have their Visible property set to True, then it will look like the first tab is selected, but its contents will not be displayed. Clicking on the tab displays the contents.
This is how I define the tabs in my layout file.
If I remove the <Property Name="Visible" Value="True" /> for the Models tab, then it will look as if the Models tab is selected, but nothing will appear. With the property, all is fine.
I'm using CEGUI 0.7 with Ogre 1.6.3. I'm not sure if this is intended or a bug. If I have a TabControl widget with child tabs and none have their Visible property set to True, then it will look like the first tab is selected, but its contents will not be displayed. Clicking on the tab displays the contents.
This is how I define the tabs in my layout file.
Code: Select all
<Window Type="TaharezLook/FrameWindow" Name="TemplateEdit">
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{0,610},{0,700}}" />
<Property Name="Text" Value="Template Edit" />
<Window Type="TaharezLook/TabControl" Name="TemplateEdit/ComponentTabs">
<Property Name="UnifiedPosition" Value="{{0,10},{0,5}}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{1,-20},{1,-280}}" />
<Property Name="TabPanePosition" Value="Top" />
<Property Name="TabHeight" Value="{0,25}" />
<Window Type="DefaultWindow" Name="TemplateEdit/ComponentTabs/ModelTab" >
<Property Name="Text" Value="Model" />
<Property Name="Visible" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="Visible" Value="True" />
<Window Type="TaharezLook/StaticText" Name="TemplateEdit/ShipModelLabel">
<Property Name="UnifiedPosition" Value="{{0,5},{0,5}}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{0,200},{0,30}}" />
<Property Name="Text" Value="Ship Model" />
</Window>
<Window Type="TaharezLook/Combobox" Name="TemplateEdit/ShipModelCombobox">
<Property Name="UnifiedPosition" Value="{{0,210},{0,5}}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{0,250},{0,300}}" />
<Property Name="ReadOnly" Value="True" />
</Window>
</Window>
<Window Type="DefaultWindow" Name="TemplateEdit/ComponentTabs/WeaponTab" >
<Property Name="Text" Value="Weapons" />
<Property Name="Visible" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
</Window>
</Window>
</Window>
If I remove the <Property Name="Visible" Value="True" /> for the Models tab, then it will look as if the Models tab is selected, but nothing will appear. With the property, all is fine.