How to detect Mouse-Events for Markup-Control? |
Post Reply |
Author | |
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
Posted: 05 December 2008 at 4:59am |
Hi,
how can I detect if the user holds the mouse down or makes mousemoves on a markup-control? Is there a way? |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
PLEASE can you help!?
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
This trick seems to work:
1) Create a dummy Border object that will be the Height & Width of the MarkupLabel and give it the background colour of the underlying container. 2) Associate the Mouse events with the Border 3) Add the rest of your markup into a Container type element (e.g. StackPanel) and then set that to the Child property of the Border. Here's an example:
What I don't know is if the MouseMoveEvent exposes the X & Y coordinates of the mouse (and if so, I don't know how to retrieve that information). You might have to get the mouse position using the API and convert it to appropriate coordinates relative to your form & MarkupLabel control. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Realy not bad! ;-)
Thank you!!! |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Glad to help...hacky, but it seems to work ;)
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |