Trouble with ToolTips


#1

I’ve declared a TooltipWindow in my content compontent class but i can’t get it work. My tooltip clients are all set but im still getting nothing is there somthing more i need to do besides declaring a tooltipwindow in the main content component?


#2

as long as a single tooltipWindow exists, it should work. Don’t add it to any components or anything - just create it. And make sure you’ve got rtti enabled in your app.

There’s an example of it in the demo app, in MainDemoWindow.cpp.


#3

Ok i got that working but now i have a wierd problem

when ever i’m have the mouse over a component that not drived from the TooltipClient class my debugger streams out this error

Microsoft C++ exception: __non_rtti_object @ 0x0012f194.

any ideas?

thanks


#4

Ah i see is rtti a compiler option?


#5

Add -GR to your option list

you can always type “cl /?” from the command prompt to see the options,
or “cl /? | findstr RTTI” - to show you directly the option for RTTI for example.


#6

Cool that did the trick

you guys rock thanks

now i need to read what rtti is all about


#7

one last thing i dont see a method to be able to turn tooltips on or off

any ideas

thanks


#8

[quote=“Nugtoka”]one last thing i dont see a method to be able to turn tooltips on or off
any ideas [/quote]
ditto !
I’m actually doing this thru pointers and new/delete, though I’m sure there must be a leaner solution ?

Thanks,
Salvator


#9

[quote=“Salvator”][quote=“Nugtoka”]one last thing i dont see a method to be able to turn tooltips on or off
any ideas [/quote]
ditto !
I’m actually doing this thru pointers and new/delete, though I’m sure there must be a leaner solution ?

Thanks,
Salvator[/quote]

I’d probably go for a ScopedPointer


#10

Thanks for the suggestion.

I also found that sending an empty string also bypass it :

This is very cool :slight_smile:

Salvator


#11