Page 1 of 1

Tooltip not showing

Posted: Wed Jul 20, 2005 06:49
by Sachin
well i want to show a tooltip on a button. I created the button & then used the following line.

btn->setTooltipText("asasas");

now using windows timer im executing the following line every 1 second

CEGUI::System::getSingleton().injectTimePulse(1);

but still no tooltip is showing wen i move the mouse onto the button.

Any Pointers? 8)

Re: Tooltip not showing

Posted: Wed Jul 20, 2005 07:21
by Sachin
Ok i got the solution.i missed this

Tooltip* tt = (Tooltip*)WindowManager::getSingleton().createWindow((utf8*)"TaharezLook/Tooltip", (utf8*)windowName );
btn->setTooltip(tt);

Re: Tooltip not showing

Posted: Wed Jul 20, 2005 08:44
by CrazyEddie
That's one way of doing it, though is not the way you want to be doing it for most 'normal' cases. What you probably really wanted was this:

Code: Select all

CEGUI::System::getSingleton().setTooltip("TaharezLook/Tooltip");


This creates a 'shared' tool-tip which the system will use for all widgets. What you have done is perfectly valid, though is intended for cases where you want a particular widget to have a special custom tooltip.