Tab buttons, alternate positioning
Moderators: CEGUI MVP, CEGUI Team
Tab buttons, alternate positioning
This is, actually, a revisited topic. The original was posted right here. As you can see, it has gone unanswered, which is truly a shame.
I am trying to move the tab buttons to the bottom of the tab control. Going through the looknfeel file leads to tabcontrol, tabpane, tabbutton, none of which seem to do anything when trying to position the tabs on the bottom.
Anybody had any luck? It seems like such a basic problem, too, so I would be interested in knowing how this is accomplished.
I am trying to move the tab buttons to the bottom of the tab control. Going through the looknfeel file leads to tabcontrol, tabpane, tabbutton, none of which seem to do anything when trying to position the tabs on the bottom.
Anybody had any luck? It seems like such a basic problem, too, so I would be interested in knowing how this is accomplished.
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Hi LennyH,
The last time I got the cvs code and ran the demo apps (more than a month ago I think) there was a demo all about the tab control, and Im positive that the demo allowed you to position the tab buttons at the bottom of the control, and you could change the size of the buttons dynamically.
Does looking at this demo code not help you? If you are wanting to define new looks/behaviours for the tab control via the XML files, I havent done that before so I cant help you, sorry.
The last time I got the cvs code and ran the demo apps (more than a month ago I think) there was a demo all about the tab control, and Im positive that the demo allowed you to position the tab buttons at the bottom of the control, and you could change the size of the buttons dynamically.
Does looking at this demo code not help you? If you are wanting to define new looks/behaviours for the tab control via the XML files, I havent done that before so I cant help you, sorry.
Looking back, I do note that I forgot to mention that at the time of this post, I was looking for information in regards to CEGUI 0.4.1.
We've recently decided to make a migration to Delta3D 1.4, which makes use of CEGUI 0.5.0. Having now downloaded the CEGUI 0.5.0 source seperately, I do see the sample you were talking about.
->setTabPanePosition( ... ) from a TabControl looks like exactly what I will want, once I get migrated over.
We've recently decided to make a migration to Delta3D 1.4, which makes use of CEGUI 0.5.0. Having now downloaded the CEGUI 0.5.0 source seperately, I do see the sample you were talking about.
->setTabPanePosition( ... ) from a TabControl looks like exactly what I will want, once I get migrated over.
I've been looking around a bit more about tabs, and I am curious: is there any way to set the size of the tab buttons and their positioning/spacing between each other and the sides of the control? It is bad that if I have a control of an absolute size, the buttons still scale to the window size when it's resized. You would think that, at best, the button would inherit a scale based of its parents size, thereby making it only scale up if the parent ever changes size. This to me is vital.
The ability to properly space the tabs is a secondary issue, more for stylistic purposes. This can be 'easily' faked with images if the scaling issue is resolved, but, even still, I would prefer if there was a way to set it in code.
The ability to properly space the tabs is a secondary issue, more for stylistic purposes. This can be 'easily' faked with images if the scaling issue is resolved, but, even still, I would prefer if there was a way to set it in code.
LennyH wrote:I've been looking around a bit more about tabs, and I am curious: is there any way to set the size of the tab buttons and their positioning/spacing between each other and the sides of the control? It is bad that if I have a control of an absolute size, the buttons still scale to the window size when it's resized. You would think that, at best, the button would inherit a scale based of its parents size, thereby making it only scale up if the parent ever changes size. This to me is vital.
The ability to properly space the tabs is a secondary issue, more for stylistic purposes. This can be 'easily' faked with images if the scaling issue is resolved, but, even still, I would prefer if there was a way to set it in code.
I'm still looking for a solution to this, or at least a comment if it is not easily accomplishable...
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
How about the tab methods setTabHeight and setTabTextPadding. Would a combination of these do what you need, or have I misunderstood your question?
spannerman wrote:How about the tab methods setTabHeight and setTabTextPadding. Would a combination of these do what you need, or have I misunderstood your question?
These don't really address the problem.
The problem is that even if you set a tab control to be an absolute size, the tab buttons still scale with screen size. This is unintuitive and, I would argue, bad behavior.
From this problem, which is my main issue, I also began thinking of other questions: namely, why is there no ability to set tab button size and spacing between buttons and the edges?
I think the incorporation of such functions - combined with a solution to the problem - would make for a slightly more flexible and friendly tab control.
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
LennyH wrote:
The problem is that even if you set a tab control to be an absolute size, the tab buttons still scale with screen size. This is unintuitive and, I would argue, bad behavior.
Really? I have used the tabcontrol a few times and was unaware of this problem. Your right if this is the case, it doesnt sound like consistant behaviour.
LennyH wrote:
From this problem, which is my main issue, I also began thinking of other questions: namely, why is there no ability to set tab button size and spacing between buttons and the edges?
So I take it you cant achive this via modifying the looknfeel xml? If not, you could try raising a feature request. Sorry I cant be of more help, hopefully a cegui developer can help you.
spannerman wrote:Really? I have used the tabcontrol a few times and was unaware of this problem. Your right if this is the case, it doesnt sound like consistant behaviour.
Unless I have missed an obvious setting somewhere, this does appear to be the case. But, I asked here in hopes I did miss an obvious setting :p Looks like I didn't though

So I take it you cant achive this via modifying the looknfeel xml? If not, you could try raising a feature request. Sorry I cant be of more help, hopefully a cegui developer can help you.
Welp, I have definitely been modifying the looknfeel, but because of the nature of the tab buttons being added programmatically, it seems that the looknfeel simply cannot provide the appropriate power to do this. Again, though, if others have played with the control and gotten it to do these things, I am all ears.
Yeah, I've been mulling over posting a feature request :p I've also been hoping a CEGUI dev person would stop in. I know they are out there, but are suspiciously quiet on my threads

- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Just want to update this a little bit; my points on functionality and behavior still stand.
However, I did figure out ( and initially overlooked ) how to position the tabpane, which at least solves my issue of padding the left and right most sides.
The /TabControl has a child type for /TabButtonPane. In this section you can position.
As a segway, do the tab buttons support hover ability? Having normal and selected but not hover seems odd to leave out. I have not looked into this at all, since I *just* thought of it. I will do so, of course, but if anybody knows off hand...
However, I did figure out ( and initially overlooked ) how to position the tabpane, which at least solves my issue of padding the left and right most sides.
The /TabControl has a child type for /TabButtonPane. In this section you can position.
As a segway, do the tab buttons support hover ability? Having normal and selected but not hover seems odd to leave out. I have not looked into this at all, since I *just* thought of it. I will do so, of course, but if anybody knows off hand...

Positioning the tabbuttonpane works for the padding left and right, as desired. However, in order to make the whole control look proper in terms of the images, it becomes necessary to extend the content pane to cover the area of the tabbuttonpane. In effect, the tabbuttonpane is invisible, the buttons sit inside it ( which are visible ), and the content pane fills the bottom part of the image. This is necessary, because if you add padding [ie, width of tab control is 100, tabbuttonpane width is 80, 10 pixels in on each side] you would be looking at the background of your app in those 20 spare pixels if you don't extend the tab content pane down.
This works perfectly acceptable when you're looking at it.
Now, click on the tab control or any controls inside the tab control. Because it now has focus, it gets brought to the front and over the tab button pane.
How do I address this issue? Ideally, I could set always on top for the tabbuttonpane ( not provided ). The problem with that, of course, is if I also have to set always on top for the tab control itself...CEGUI favors the one with focus, thus bringing me to my problem.
A z-ordering ability would be loved right now. Is this possible currently?
But my main issue is preventing the tabbuttonpane from disappearing.
This works perfectly acceptable when you're looking at it.
Now, click on the tab control or any controls inside the tab control. Because it now has focus, it gets brought to the front and over the tab button pane.
How do I address this issue? Ideally, I could set always on top for the tabbuttonpane ( not provided ). The problem with that, of course, is if I also have to set always on top for the tab control itself...CEGUI favors the one with focus, thus bringing me to my problem.
A z-ordering ability would be loved right now. Is this possible currently?
But my main issue is preventing the tabbuttonpane from disappearing.
Turning off auto-scaling of the font being used has prevented the problem of the buttons stretching when resizing the window. I still contest, however, that all windows and text should remain relative to their parent >>
edit:
If you add:
For the a child window in your looknfeel file, it will keep that child on top for the whole widget, which so far seems to have eliminated my problem with how CEGUI focuses windows.
For example of use [minus a lot of fluff]:
edit:
If you add:
Code: Select all
<Property name="AlwaysOnTop" value="True" />
For the a child window in your looknfeel file, it will keep that child on top for the whole widget, which so far seems to have eliminated my problem with how CEGUI focuses windows.
For example of use [minus a lot of fluff]:
Code: Select all
<WidgetLook name="whatever">
<Child type="WhateverLook/WhateverWidget" nameSuffix="whateverSuffix">
<Area>
...
</Area>
<Property name="AlwaysOnTop" value="True" />
</Child>
...
</WidgetLook>
Who is online
Users browsing this forum: No registered users and 16 guests