Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Behaviour prop. of Diagram and selection retangle (Read 1101 times)
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
Behaviour prop. of Diagram and selection retangle
Aug 31st, 2010 at 2:29pm
Print Post  
Hi,

if I set the behaviour property of the diagram to 'Modify', I get the selection retangle, when I click and hold the left mouse button. Is it possible to deactivate this selection retangle? We just want to select single nodes.
This also happens with the behaviour 'Custom', when the NodeCreating event is canceled.

One possible way could be to set the behaviour to 'DoNothing', but in that case we also have to handle the selection directly in the mouseevents and need to find the node to select via the position of the mousecursor. But perhaps you have a better idea.

Thanks for your help.
  Kai-Uwe
  
Back to top
WWWYIM  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Behaviour prop. of Diagram and selection retan
Reply #1 - Aug 31st, 2010 at 5:37pm
Print Post  
Hi,

You can do that via custom behavior class that overrides StartDraw as below.

Code
Select All
public override InteractionState StartDraw(Point point)
{
	DiagramItem ac = Diagram.ActiveItem;
	int handle = 0;

	if (ac != null && !ac.NotInteractive() && ac.HitTestHandle(point, ref handle))
		return new InteractionState(ac, handle, Action.Modify);

	return null;
} 



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