Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic query regarding cursor in custom Behavior (Read 1915 times)
ayushneema
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 23rd, 2009
query regarding cursor in custom Behavior
Sep 29th, 2009 at 7:40am
Print Post  
Hi,
I have created an diagram that contain node. The node also have anchor and expanded button.
my requirment is that when i hover my mouse on anchor, cursor should change into "pen" and when i hover the mouse on expended button it should change in to "hand". Moreover if user starts the creating link but does not create (user leave mouse left button on diagram) the link cursor should turn into its previous state.

i am able to change the cursor to "pen" (on anchor)but as soon as i start to draw links cursor turn into "none". i kept the digram behviour custom.

can you please suggest me what shoud i do?
i am sending you sample applicaton.
Thanks
Ayush Neema.




  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: query regarding cursor in custom Behavior
Reply #1 - Sep 29th, 2009 at 9:50am
Print Post  
Hi,

Use Diagram.OverrideCursor to set some fixed mouse cursor, and set it back to null when you need to continue using the default context-sensitive cursors.

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


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 23rd, 2009
Re: query regarding cursor in custom Behavior
Reply #2 - Sep 29th, 2009 at 12:10pm
Print Post  
Hi stoyo,
Thanks for quick reply.
could you please explain bit more about it.
Thanks
Ayush Neema
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: query regarding cursor in custom Behavior
Reply #3 - Sep 29th, 2009 at 3:45pm
Print Post  
Handle MouseMove and if you detect the mouse is over the expand button or over an anchor point, set OverrideCursor. Otherwise set it to null, unless diagram.Interaction is != null, and Interaction.CurrentItem is a DiagramLink (so the cursor stays while drawing a link). You can use diagram.HitTestManipulators() to find out if there is an expand button under the cursor, and the GetAnchorAt method I sent you with a custom behavior some time ago to see if there is an anchor point under the mouse pointer.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint