Tabutton fills whole tabcontrol window

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Tabutton fills whole tabcontrol window

Postby mba » Thu Feb 22, 2007 07:56

Hi

been following the widget galore example for creating a tabcontrol, but I seem to have some difficulties as the tabpane button fills the whole tabcontrol in the vertical direction, I had a working example previously but I'm failing getting it to work now. Btw I'm using CEGUI 0.5.0b.

Heres some layout Im using

Code: Select all

<Window Type="TaharezLook/TabControl" Name="Test/TabControl" >
  <Property Name="TabHeight" Value="{0.0,0,0.02}" />
  <Property Name="TabTextPadding" Value="{0,0}" />
  <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  <Property Name="UnifiedAreaRect" Value="{{0.106814,0},{0.433333,0},{0.681177,0},{0.95,0}}" />
 </Window>
<Window Type="TaharezLook/TabPane" Name="Test/TabPane" >
  <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.65,0},{0.65,0}}" />
</Window>


And the code to make it work.

Code: Select all

    CEGUI::TabControl *tc =
      static_cast<CEGUI::TabControl*>(CGfx::win_mgr->getWindow((CEGUI::utf8*)"Test/TabControl"));
    tc->setTabHeight(CEGUI::UDim(0.15f,0.0f));

    CEGUI::Window *tp = CGfx::win_mgr->getWindow((CEGUI::utf8*)"Test/TabPane");
    tp->setText("Test");
    tp->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f,0.0),CEGUI::UDim(1.0f,0.0)));
    tp->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0f,0.0),CEGUI::UDim(0.0f,0.0)));
    tc->addTab(tp);




Kind regards
Martin B. Andersen

Return to “Help”

Who is online

Users browsing this forum: No registered users and 10 guests