Any ideas on how to change tooltip colors & font

UCM

Centurion
Joined
Jan 1, 2003
Location
Colorado, usa
I assume we would probably ned to do some sort of ownerdraw form of a tooltip in order to change the background color, fore color, and the font...

Any idea on where to start?
 

Volte

Neutiquam Erro
Joined
Nov 17, 2002
User Rank
*Expert*
I highly doubt that Tooltips are any real physical object that have
handles and DCs and whatnot. They are more than likely just drawn
on the screen. Unless you draw your own tooltips on the screens
DC like that, I dont think you can change the existing ones.
 

UCM

Centurion
Joined
Jan 1, 2003
Location
Colorado, usa
hmmm, theres an idea...

One idea would be to create a form and use it as a tooltip no problem, but it wouldnt be a real tooltip...

How would I create an ownerdrawn or DC tooltip? Any example code would help a great deal :)
 

Volte

Neutiquam Erro
Joined
Nov 17, 2002
User Rank
*Expert*
Like I said, you most likely cant. I doubt tooltips are actual objects,
and therefore cannot be ownerdrawn.
 
M

mutant

You can poorly( :) ) imitate the tooltip.

Thats how I would do it: Create a bitmap with the text you want to show, put a picturebox and make it invisible. On the mousemove event of a control set the apporopriate image to the picture box, get the location of the control, subtract or add the values from its location and then set the modified location to the picturebox so it doesnt go over the control, make the picturebox visible. On mouseleave event make the picture box invisible.

This is a very poor imitation of a tooltip :D
 

UCM

Centurion
Joined
Jan 1, 2003
Location
Colorado, usa
Lol! thanx guys, I got a pretty good idea on where to start now :)


Ill try to remember to knock up an example of something like that and post it up here ( poor or not, lol )
 

UCM

Centurion
Joined
Jan 1, 2003
Location
Colorado, usa
Heres a little example of a customized tool tip ( not exactly a tooltip, but it serves the purpose and allows for many appearance altering abilities...

As you can see of course, there are a few things up with it...

one of which is a timing effect ( we can worry bout that later )...

another is the amount of text that is displayed isnt much before it stops displaying the rest of the text...

Guys, feel free to play around with it, if you make any modifications, please post them here, thanx! :D
 

Attachments

  • customtooltipexample.zip
    22.9 KB · Views: 14
M

mutant

Cool ToolTip, just add the museleave event so it hides and its all set. But one of the problems is that main form looses focus when the tooltip is shown.
 
M

mutant

Hehe.
Here is my version of a custom tooltip.

[edit] Removed binaries - divil [/edit]
 

Attachments

  • windowsapplication2.zip
    18.7 KB · Views: 20
Last edited by a moderator:

UCM

Centurion
Joined
Jan 1, 2003
Location
Colorado, usa
nice one, mutant...

Images do provide a sweet appearence of tooltips...

I find text-only can be just as useful if we can work out the size of it ( make it autoscale its size to accomidate any length of text )

Thisll be fun to work on for a while ;)

One thing Ill need to do is use Divils example of not loosing focus from one of the other threads in this forum...

and of course, make a mouse_leave event thingy among other things too...

All suggestions and comments are welcome...
 
Top