Hello,
I have tooltips displaying properly for all elements other than comboboxes and tab control buttons. What might be the cause of it? I'm using cegui 0.5.1.
Thanks.
[SOLVED] tooltip on comboboxes and tabcontrols
Moderators: CEGUI MVP, CEGUI Team
[SOLVED] tooltip on comboboxes and tabcontrols
Last edited by sjcomp on Mon Dec 08, 2008 06:27, edited 1 time in total.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I guess you're setting the tooltip text on the base container for the combobox and tabcontrol (as well you might expect to), the issue is that the system thinks the mouse is over different windows (the component parts of the combobox and tabcontrol). There is a mechanism whereby children can inherit the parent tooltip text (which is what you need), though this is disabled on all widgets by default - it should really be enabled by default (as is the case in SVN trunk IIRC - I'm not suggesting you start using that btw ).
One solution would be to edit your looknfeel skin file and add a property initialiser to each WidgetLook definition to enable this setting:
Bit of a pain, though it should get you what you want.
CE.
I guess you're setting the tooltip text on the base container for the combobox and tabcontrol (as well you might expect to), the issue is that the system thinks the mouse is over different windows (the component parts of the combobox and tabcontrol). There is a mechanism whereby children can inherit the parent tooltip text (which is what you need), though this is disabled on all widgets by default - it should really be enabled by default (as is the case in SVN trunk IIRC - I'm not suggesting you start using that btw ).
One solution would be to edit your looknfeel skin file and add a property initialiser to each WidgetLook definition to enable this setting:
Code: Select all
<Property name="InheritsTooltipText" value="True" />
Bit of a pain, though it should get you what you want.
CE.
Thanks, CE. An easy solution actually It works perfectly for comboboxes. But I see that I have a different issue with TabControl. I'd like to assign hints to TabControl buttons, but I have no access to them through my layout. I did assign hints to the tab panes (DefaultWindow), but it simply shows hint when I hover over the window itself. My question is: can I assign hints to tabcontrol buttons through the layout?
I can take care of it through my program and reassign hints from the tab pane to the corresponding button. But maybe there is a more elegant solution (like a few copy/paste operations)?
Thanks.
I can take care of it through my program and reassign hints from the tab pane to the corresponding button. But maybe there is a more elegant solution (like a few copy/paste operations)?
Thanks.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Providing you add your tab content directly as child elements of the TabControl - meaning the TabControl definition and it's content are in the same layout - it's possible to set the tooltips. Basically you use the auto-window mechanism to set the Tooltip property on the automatically created button. The key is that the AutoWindow element must appear after the Window definitions for the tab pane content.
The tab pane buttons are named as: __auto_TabPane__Buttons__auto_btn<content name>, so if your content window was named "APane", the button for it is called "__auto_TabPane__Buttons__auto_btnAPane"
So, for example:
HTH
CE
The tab pane buttons are named as: __auto_TabPane__Buttons__auto_btn<content name>, so if your content window was named "APane", the button for it is called "__auto_TabPane__Buttons__auto_btnAPane"
So, for example:
Code: Select all
<Window Type="TaharezLook/TabControl" Name="myTabControl" >
<Property Name="Tooltip" Value="This is the tab control" />
<Property Name="TabHeight" Value="{0,-1}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TabPanePosition" Value="Bottom" />
<Property Name="UnifiedAreaRect" Value="{{0,10},{0,30},{1,-10},{1,-10}}" />
<Window Type="DefaultWindow" Name="myTabControl/APane" >
<Property Name="Text" Value="A Pane" />
</Window>
<!-- Set the tooltip for the tab button -->
<AutoWindow NameSuffix="__auto_TabPane__Buttons__auto_btnAPane" >
<Property Name="Tooltip" Value="This is a pain!" />
</AutoWindow>
</Window>
HTH
CE
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
IIRC there have been other posts with regards to manually added content being removed in the editor, although those dealt with 'normal' properties that are just not supported by the editor and get removed. I've not looked at this specific case, though it's probably a CEGUI issue, since CEGUI is actually writing the XML.
So no, I do not think there's a (simple) way to get this support at the moment, unfortunately. (Unless someone else knows different, of course ).
CE.
IIRC there have been other posts with regards to manually added content being removed in the editor, although those dealt with 'normal' properties that are just not supported by the editor and get removed. I've not looked at this specific case, though it's probably a CEGUI issue, since CEGUI is actually writing the XML.
So no, I do not think there's a (simple) way to get this support at the moment, unfortunately. (Unless someone else knows different, of course ).
CE.
Who is online
Users browsing this forum: No registered users and 7 guests