Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable selection rectangle? (Read 4390 times)
azany1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Jun 14th, 2006
Disable selection rectangle?
Jun 14th, 2006 at 2:28am
Print Post  
Is there a way to programmatically enable/disable the selection rectangle?  I've tried setting my_chart.Selection.AllowMultiSel to false, but that only seems to disallow adding more than one object to the selection.

Is there some other API that I'm missing?

Thanks for any info,
-lipp
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable selection rectangle?
Reply #1 - Jun 14th, 2006 at 6:53am
Print Post  
Try setting

fc.ModifierKeyActions.Control = ModifierKeyAction.None;

That should work as long as Behavior is not set to Modify (Modify lets you draw a selection rectangle without holding Control).

Stoyan
  
Back to top
 
IP Logged
 
azany1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Jun 14th, 2006
Re: Disable selection rectangle?
Reply #2 - Jun 14th, 2006 at 7:15am
Print Post  
Hmm...doesn't seem to make a difference.  Behavior is set to CreateArrow.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable selection rectangle?
Reply #3 - Jun 14th, 2006 at 7:25am
Print Post  
Ok, it seems CreateArrow lets you draw selection rectangles without holding Ctrl too. Try handling the MouseMove event and check whether there is a node under the mouse pointer - if there is a node, set Behavior to CreateArrow; if there isn't, set Behavior to DoNothing.

Stoyan
  
Back to top
 
IP Logged
 
azany1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Jun 14th, 2006
Re: Disable selection rectangle?
Reply #4 - Jun 14th, 2006 at 3:54pm
Print Post  
I haven't given this a try yet, but I was just thinking: I don't want to switch Behavior back to DoNothing if I'm in the process of creating an arrow, right?  Is there a way to tell from my MouseMove handler whether the chart control is currently creating an arrow?

Thanks again,
-lipp
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable selection rectangle?
Reply #5 - Jun 14th, 2006 at 5:42pm
Print Post  
You are right - check the MouseEventArgs.Button property before changing the Behavior to DoNothing. Change it only if e.Button == MouseButtons.None.

Stoyan
  
Back to top
 
IP Logged
 
azany1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Jun 14th, 2006
Re: Disable selection rectangle?
Reply #6 - Jun 15th, 2006 at 6:05am
Print Post  
That works great!

Thanks,
-lipp

ps: For what it's worth, it would be nice if this level of control over the selection rectangle was some provided by the FlowChart directly.  Thanks again for your help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable selection rectangle?
Reply #7 - Jun 15th, 2006 at 6:28am
Print Post  
You need to allow single-item selection by clicking items but not by drawing a selection rectangle ?

Stoyan
  
Back to top
 
IP Logged
 
azany1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Jun 14th, 2006
Re: Disable selection rectangle?
Reply #8 - Jun 15th, 2006 at 8:30pm
Print Post  
As it happens, I'm trying to disable all selection (single & multiple) while still allow creation of arrows.  But, it would be nice to be able to enable/disable single selection & multiple selection independently.

In particular, I assumed that setting Selection.AllowMultiSel to false would disable the selection rectangle, regardless of behavior.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint