Hi, And Thanks For Taking The Time To Read...
I'm working on a project, an instant messenger / chatbox deal in the program I working on. I have created the box, and I have a TabControl, and some default windows which get added to the TabControl through ->addTab. In the .layout file, I specify the Property Text, with the value that appears as the caption of that tab button. Now, when a message arrives, I want to notify the user on which tab they need to pay attention to. I'd like to do this by perhaps blinking the tab control, or by changing it's text color.
Right now, I have it alert the user that a message has arrived by using setText to alter the text of the Tabbutton to contain a trailing *, but this is both ungraceful, and tacky. If there is a better, more elegant solution, (or a completely different concept of how to do this) it would be much appreciated.
Thank you for your time, and I look forward to your response,
Erebus.
[Solved! Thanks Guys] Tabcontrol/TabButton
Moderators: CEGUI MVP, CEGUI Team
[Solved! Thanks Guys] Tabcontrol/TabButton
Last edited by Erebus on Thu Feb 14, 2008 14:27, edited 1 time in total.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I think this is not an easy solution.
You need to get access to the automatically created buttons for the 'tabs' and set colour properties on them directly.
They are named like this:
<WindowName>__auto_TabPane__Buttons__auto_btn<PageName>
So, if your TabControl window was named for example "ChatBox/Conversations" and the tab you wanted to change the text colour of is named "CrazyEddie" then the name of the button is "Chatbox/Conversations__auto_TabPane__Buttons__auto_btnCrazyEddie"
You obtain a pointer to this window with using the WindowManager::getWindow member function.
Once you have the window pointer, you can set the colour like this:
CE.
I think this is not an easy solution.
You need to get access to the automatically created buttons for the 'tabs' and set colour properties on them directly.
They are named like this:
<WindowName>__auto_TabPane__Buttons__auto_btn<PageName>
So, if your TabControl window was named for example "ChatBox/Conversations" and the tab you wanted to change the text colour of is named "CrazyEddie" then the name of the button is "Chatbox/Conversations__auto_TabPane__Buttons__auto_btnCrazyEddie"
You obtain a pointer to this window with using the WindowManager::getWindow member function.
Once you have the window pointer, you can set the colour like this:
Code: Select all
...
// set colour to green
wnd->setProperty( "NormalTextColour", "FF00FF00" );
...
CE.
Who is online
Users browsing this forum: Bing [Bot] and 9 guests