Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Change cursor on mouse hover (Read 2130 times)
srlevitt
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Mar 27th, 2007
Change cursor on mouse hover
Sep 11th, 2008 at 8:10pm
Print Post  
Is there a way to change the cursor from the default hand to e.g. cross when the mouse is over an anchor point?
When the mouse is not over anything, I want the cursor to be the standard arrow.
when the mouse is over a shape node, I want it to be a hand.
When the mouse is over one of my anchor points, I want it to be a cross.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change cursor on mouse hover
Reply #1 - Sep 12th, 2008 at 8:31am
Print Post  
You will have to create a custom Behavior class and override its SetMouseCursor method. The sample code here shows how to detect whether the mouse is over an anchor point:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=121025732...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
srlevitt
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Mar 27th, 2007
Re: Change cursor on mouse hover
Reply #2 - Sep 12th, 2008 at 2:56pm
Print Post  
Yes, that works fine thanks. The only problem I have now is that the user can click and move the mouse and a new shape is drawn. I do not want this to happen. Previously, moving the mouse like this created a shaded "selection" area. I guess it's the fact I am now using behavior.custom rather behavior.drawLinks for View.Behavior. Any ideas? Thanks.
  
Back to top
 
IP Logged
 
srlevitt
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Mar 27th, 2007
Re: Change cursor on mouse hover
Reply #3 - Sep 12th, 2008 at 3:38pm
Print Post  
OK, stand easy. I found a way to do this by overriding StartDraw in my custom behavior, and returning  "new InteractionState(Diagram.Selection, 8, Action.Create);"

Thanks anyhow  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint