Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

UCM

>-)

  • *Experts*
Posted

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 screen's

DC like that, I don't think you can change the existing ones.

Posted

hmmm, theres an idea...

 

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

 

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

UCM

>-)

Guest mutant
Posted

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

Posted

Lol! thanx guys, I got a pretty good idea on where to start now :)

 

 

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

UCM

>-)

Posted

Here's 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 isn't 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

customtooltipexample.zip

UCM

>-)

Guest mutant
Posted
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.
Posted

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 it's size to accomidate any length of text )

 

This'll be fun to work on for a while ;)

 

One thing I'll need to do is use Divil's 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...

UCM

>-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...