Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Showing selection handle of node together with anchor pattern (Read 3025 times)
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Showing selection handle of node together with anchor pattern
Mar 6th, 2012 at 3:39pm
Print Post  
Hi,

I have a node where the following properties are set;

Code
Select All
this.EnabledHandles = AdjustmentHandles.Move;
this.HandlesStyle = HandlesStyle.Invisible;
this.AnchorPattern = AnchorPattern.TopInBottomOut;
 



This gives me the behaviour that I want in that I can;
1) Move the node around, but cannot resize it
2) Draw links using the little circle at the bottom of the node

However, when I select the node on the diagram there is nothing to indicate visually that it is selected. If I change the properties to;

Code
Select All
this.EnabledHandles = AdjustmentHandles.Move;
this.HandlesStyle = HandlesStyle.MoveOnly;
this.AnchorPattern = AnchorPattern.TopInBottomOut;
 



This gives me a shaded border when the node is selected which is great, but unfortunately I can no longer draw links from the node.

Is there anyway to get the effect I am after?

Matt


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Showing selection handle of node together with anchor pattern
Reply #1 - Mar 6th, 2012 at 5:27pm
Print Post  
You could set the following and will be able to draw links from MoveOnly nodes that are not selected:

diagram.ModificationStart = ModificationStart.SelectedOnly;

The HatchHandles3 style displays a shade similar to the MoveOnly style + adjustment handles, but will also let you draw links from a selected node. So you could keep the auto-handles modification, hide the disabled resize handles to get the MoveOnly appearance, and still be able to draw links:

diagram.ShowDisabledHandles = false;
e.Node.EnabledHandles = AdjustmentHandles.Move;
e.Node.HandlesStyle = HandlesStyle.HatchHandles3;
e.Node.AnchorPattern = AnchorPattern.TopInBottomOut;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Showing selection handle of node together with anchor pattern
Reply #2 - Mar 7th, 2012 at 8:42am
Print Post  
Hi Stoyan,

Thanks for the quick reply.

I have tried that and it is closer to what I want.

1) Can you tell me how to hide the disabled resize handles?
2) To move a node, I have to first select it and then drag - is there any way I can get it to select and drag in one motion like before?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Showing selection handle of node together with anchor pattern
Reply #3 - Mar 7th, 2012 at 10:50am
Print Post  
Hi Matt,

1) Set diagram.ShowDisabledHandles = false;
2) Set diagram.ModificationStart = ModificationStart.AutoHandles; and use the second code block (you can choose only one of the options shown above, so use the one with HatchHandles3).

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Showing selection handle of node together with anchor pattern
Reply #4 - Mar 7th, 2012 at 1:32pm
Print Post  
Hi Stoyan,

Yes that has done the trick.

Thanks again!
Matt
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint