Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Few issues. (Read 2752 times)
Shane
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Mar 26th, 2009
Few issues.
Mar 26th, 2009 at 10:23am
Print Post  
Hi All,

I am trying to highlight the active node when the HandleStyle property of the node is set to MoveOnly.
I referred   to the following discussion from the forum. The suggestion is as follows :

" You could set the Brush to highlight the node, or set HandlesStyle = Custom and draw the selection frame as you need it from the DrawAdjustmentHandles event handler. "

But the problem is I cannot use the first suggestion related to setting the brush of active node. Can someone please provide few details how to incorporate the second suggestion.

Thanks,
Shane.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Few issues.
Reply #1 - Mar 26th, 2009 at 2:29pm
Print Post  
Hi Shane,

This example shows how to implement custom drawing for selection handles:

https://mindfusion.eu/_samples/CustomHandlesStyle.zip

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


I love YaBB 1G - SP1!

Posts: 24
Joined: Mar 26th, 2009
Re: Few issues.
Reply #2 - Mar 27th, 2009 at 12:16pm
Print Post  
Hi Stoyan,

That reference has provided a lot of help and the functionality is running fine.

I also have a functionality to lock the movement of the node on click of a button the code used by me for the purpose is as follows :

void diagram_NodeStartModifying(object sender, NodeValidationEventArgs e)
       {
           if (lockNodeMovement)
           {
               e.CancelDrag();
               diagram.OverrideCursor = Cursors.Arrow;
           }
           else
           {
               diagram.OverrideCursor = null;
           }
       }

By integerating the code the node movement is distorted i.e when nodes are selected and user tend to move them by dragging the mouse then nodes mutual alignment get distorted.

I have set the HandleStyle property of the nodes as custom.

Any suggestions how can I fix this.

Thanks,
Shane.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Few issues.
Reply #3 - Mar 27th, 2009 at 1:48pm
Print Post  
Hi Shane,

Have you tried setting node.Locked = true?

Stoyan
  
Back to top
 
IP Logged
 
Shane
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Mar 26th, 2009
Re: Few issues.
Reply #4 - Mar 27th, 2009 at 2:13pm
Print Post  
Hi Stoyan,

Yes I have already tried that approach but its not working thats why I used the method from my last post.

Can you suggest another approach.

I am also using this method in my code.

     void diagram_SelectionMoving(object sender, ValidationEventArgs e)
       {
           if (lockNodeMovement)
           {
               e.CancelDrag();
               diagram.OverrideCursor = Cursors.Arrow;
           }
           else
           {
               diagram.OverrideCursor = null;
           }
       }

Thanks,
Shane.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Few issues.
Reply #5 - Mar 29th, 2009 at 9:38am
Print Post  
Hi Shane,

Are you trying to lock the movement of all items in the diagram? You could do that by setting Behavior = DoNothing. Otherwise you might have to handle both NodeModifying and SelectionMoving to cancel the movement.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint