Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi!

I have a picture in WPF. The picture has words on it. I want that when the user hovers over certain words that I choose, a tooltip will appear with something.

How should I do this? Should I draw a rectangle over the words that I want and then access there points through code?

Any other ideas?

Please help.

Thanks a lot!

  • Administrators
Posted

Do you want the tooltip to appear if the cursor is over the general area of the words or exactly in a point for a letter?

 

If you are just after the general area could you not put a rectangle over the words and put the tooltip on the rectangle?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Do you want the tooltip to appear if the cursor is over the general area of the words or exactly in a point for a letter?

 

If you are just after the general area could you not put a rectangle over the words and put the tooltip on the rectangle?

 

I want the tooltip to appear when the cursor is over a certain word.

Posted
Couldn't you use multiple rectangles per word? Or is the image generated dynamically?

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted

Where does your picture come from? Is it static? (exists as a file somewhere) or is it dynamic? (is generated on the fly)

 

If it is static, you should be able to load in a few rectangle objects behind the words in the picture and set the tooltip on the rectangle object.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted
Where does your picture come from? Is it static? (exists as a file somewhere) or is it dynamic? (is generated on the fly)

 

If it is static, you should be able to load in a few rectangle objects behind the words in the picture and set the tooltip on the rectangle object.

 

It's static.

So, do you think I should draw rectangles(hidden) on the words I want and then access the points from code?

Could you please tell me how to do this in WPF?

Thanks!

Posted

Hi!

After adding the rectangle around the word, how can I determine if the mouse is inside the rectangle from code? In WPF of course...

Please help.

Thanks!

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...