Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box Selection Lost (Read 2271 times)
jgedrim
YaBB Newbies
*
Offline


FCX works. I like it.

Posts: 4
Joined: Jul 20th, 2011
Box Selection Lost
Jul 31st, 2011 at 8:58pm
Print Post  
I am trying to set some visual feedback based on properties of selected boxes in VB.

It appears that BoxSelectionLost is fired before the selection is lost. How do I detect which box has lost selection in a loop through the selection?

e.g.
Private Sub FCX_BoxSelectionLost(ByVal box As FLOWCHARTLibCtl.IBoxItem)
dim mbox as FLOWCHARTLibCtl.IBoxItem

for each mbox in FCX.SelectedBoxes
    if not (mbox is box) then
      ...
    end if
next

This does not work. It does not equate the two boxes mbox and box. Is this because of the byVal parameter?

Basically, I need to iterate the selected boxes AFTER the box has been removed from the selection. Can you help with this please?

Thanks and regards
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Box Selection Lost
Reply #1 - Aug 1st, 2011 at 9:32am
Print Post  
The following seems to work better:

Code
Select All
For i As Integer = 0 To FCX.SelectedBoxes.count
      mbox = FCX.SelectedBoxes.Item(i)
      If Not (mbox Is box) Then
            '...
      End If
Next i 


Alternatively you can use the SelectionChanged event. It seems to fire after the selection has changed.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint