Page 1 of 1

Example for Tab Pane XML, please

Posted: Wed Oct 06, 2004 09:02
by zola
Hi

This is really a noob question so forgive me if it seems too easy.

Please, could someone give an example on how to use a 'Taharez Tab Pane'?

I'm abit confused as to what has to be attached to what in thh layout XML

I do the following:

Code: Select all

Tab Pane
  -> Tab Button 1
            -> Window with the Tab content 2
  -> Tab Button 2
             -> Window with the Tab content 2


but this doesn't seem to work

Example for Tab Pane XML, please

Posted: Wed Oct 06, 2004 09:22
by CrazyEddie
I'll get back to you on this in a little while...

Example for Tab Pane XML, please

Posted: Wed Oct 06, 2004 09:37
by zola
:lol: not quite what I expected :)

Btw: When I load the Layout with the Tab Pane I get the error
GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'Taharez Tab Pane' objects.
But I do have the Tab Pane added in my WindowSet for TaharezLook.
And it also is added on the TLModule.cpp.
Strange?

Example for Tab Pane XML, please

Posted: Wed Oct 06, 2004 09:49
by CrazyEddie
:D

The Tab Pane thing is a bit strange, though you don't need to create those directly anyway :)

The following is an example of how to set this up:

Code: Select all

   <Window Type="DefaultGUISheet" Name="Demo">

      <Property Name="RelativeMaxSize" Value="w:1 h:1" />
      <Property Name="Size" Value="w:1 h:1" />

      <Window Type="Taharez Tab Control" Name="Demo/TabCtrl">
         <Property Name="RelativeMaxSize" Value="w:1 h:1" />
         <Property Name="Position" Value="x:0.25 y:0.1" />
         <Property Name="Size" Value="w:0.5 h:0.8" />

         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page1">
            <Property Name="Text" Value="Test Page 1" />

            <Window Type="Taharez Button" Name="Demo/TabCtrl/Page1/Button">
               <Property Name="RelativeMaxSize" Value="w:1 h:1" />
               <Property Name="Position" Value="x:0.1 y:0.2" />
               <Property Name="Size" Value="w:0.45 h:0.095" />
               <Property Name="Text" Value="Hello World" />
            </Window>

         </Window>

         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page2">
            <Property Name="Text" Value="Test Page 2" />

            <Window Type="Taharez Button" Name="Demo/TabCtrl/Page2/Button">
               <Property Name="RelativeMaxSize" Value="w:1 h:1" />
               <Property Name="Position" Value="x:0.3 y:0.4" />
               <Property Name="Size" Value="w:0.45 h:0.095" />
               <Property Name="Text" Value="Push Button" />
            </Window>

         </Window>
         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page3">
            <Property Name="Text" Value="Test Page 3" />
         </Window>

      </Window>

   </Window>


So basically, after creating the "Taharez Tab Control", you add children of type "DefaultGUISheet", which in turn contains the controls you want on that page. Set the text of the DefaultGUISheet to set the button label :)

HTH

CE.

Example for Tab Pane XML, please

Posted: Wed Oct 06, 2004 13:05
by zola
:) I see, quite different from what I was doing.
Thanks for the clarification.