Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box Deselected event (Read 2847 times)
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Box Deselected event
Dec 6th, 2007 at 3:21am
Print Post  
Hi,

I appear to be fhaving strange behaviour around the Box deselected event where it appears on to be firing when its deselection is caused by another box being clicked.

When the background chart is clicked, the event does not fire, leaving me unable to clean up the UI from the previous selection

Again any help greatly appreciated
JC

Update
________

This behaviour is probably as I am doing a chart.Selection.clear on Mouse down on the chart, if the selected area contained no boxes.

I am now trying to get the Deselected event to fire by looping through the Selection.Boxes in a reverse for loop, and setting the Box.Selected property to be false. This does not work either,
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Deselected event
Reply #1 - Dec 6th, 2007 at 7:15am
Print Post  
Hi,

You could move the BoxDeselected code to a method, then call this method from BoxDeselected, and for all selected boxes before calling Selection.Clear.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: Box Deselected event
Reply #2 - Dec 6th, 2007 at 7:30pm
Print Post  
So you are agreeing that the event shouldn't fire in a background chart click event?

I realised, with a touch of embarrasment, last night that it was obvious what I was looking for (when is a box being deselected when I click the background) was happening when I was clearing the selection programatically  Embarrassed

I already had a 'Deselect Box' style method called from the BoxDeselecting event, so I just called it on mouse down when NodeAt(...) was null.

Thanks for your help
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Deselected event
Reply #3 - Dec 7th, 2007 at 6:55am
Print Post  
Deselected should be raised when you click the chart background and the selection state of a box actually changes. Isn't it raised in your application (when you do not call Selection.Clear)?
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: Box Deselected event
Reply #4 - Dec 13th, 2007 at 9:45pm
Print Post  
Stoyo wrote on Dec 7th, 2007 at 6:55am:
Deselected should be raised when you click the chart background and the selection state of a box actually changes. Isn't it raised in your application (when you do not call Selection.Clear)?


Unfortunately not, no
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Deselected event
Reply #5 - Dec 14th, 2007 at 5:58am
Print Post  
Try this test application:
https://mindfusion.org/_temp/DeselEventTester.zip

From what I can see, BoxDeselected is raised as expected. You might copy your other event handlers to that project, one at a time,  leaving only the selection-related logic in them. This should show what exactly prevents BoxDeselected from being raised.

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