Page 1 of 1

How to change tabcontrol's style?

Posted: Tue Nov 25, 2008 09:15
by cluo
hi,friends

I happened to use the TabControl of CEGUI, I'm wondering if there is an option which can make the TabControl with a left aligned tab bottons. I mean the tab buttons are all located in left.
thanks

Posted: Tue Nov 25, 2008 11:32
by CrazyEddie
Hi, and welcome :)

If you mean something like this:

Code: Select all

 __________________
/ |               |
| |               |
|_|               |
| |               |
| |               |
|_|               |
| |               |
| |               |
|_|               |
  |               |
  |               |
  |               |
  |               |
  |_______________|

Then currently the only way to achieve this would be to code a new TabControl unfortunately. Perhaps in the future we will be able to make the existing TabControl a little more configurable.

CE.

thanks

Posted: Wed Nov 26, 2008 00:56
by cluo
Thanks Eddie.
I'll try :)

Posted: Wed Nov 26, 2008 10:00
by CrazyEddie
Hi,

If you intend to have a go at this, I'll offer the following advice / additional information (didn't post this yesterday as I was a little short on time).

Basically the modifications are all about the layout of the tab buttons. The tab buttons are contained within a window referred to as the TabButtonPane and named with the suffix "__auto_TabPane__Buttons". This container window can be moved around the TabControl to reposition the tab buttons as a complete set.

These buttons are sized and laid out in the functions: TabControl::calculateTabButtonSizePosition and TabControl::performChildWindowLayout

In addition you'll need to change the positioning and operation of the tab button left / right scroll buttons to operate in the up / down directions. These are again laid out in: TabControl::performChildWindowLayout and their functionality is provided in: TabControl::handleScrollPane.

Hope this gives some general direction (it's a pretty easy mod, but if you get stuck let us know, posting what you have so far).

CE.