Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Moving Attached objects strange behaviour (Read 3692 times)
feugen24
YaBB Newbies
*
Offline



Posts: 27
Joined: Sep 22nd, 2006
Moving Attached objects strange behaviour
Sep 22nd, 2006 at 12:11pm
Print Post  
Hi,
In a lane diagram (similary with the one in Demo)
with 4 lanes I attached the lower 3 lanes to the first one when "BoxModifying" event occurs (If "e.SelectionHandle == 6" (boottom center handle) is selected).I detach them at BoxModified.
Now, when I resize the first box the 3 attached ones move with it up or down but generate very strange graphical comportament(overlaping boxes, strange lines). When I stop resizing it's ok.
Same strange behaviour is also present in photo album in the demo(with only 1 object attached).
How can I solve this problem?; I may have 10 objects in practice; Refreshing the form does not help; neither Suspend layout;
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving Attached objects strange behaviour
Reply #1 - Sep 22nd, 2006 at 1:55pm
Print Post  
Hi,

In its MouseDown handler FlowChart.NET marks all links and subordinate items attached to the main one as being modified. It also draws the non-modified items in an offscreen cache image used later to repaint the screen quickly. Then when processing MouseMove, only the items marked as being modified are redrawn. So it is a bit later to attach the lower lanes in BoxModifying, which is raised for the first time when the mouse moves.

You might attach the items in MouseDown, or create a custom Behavior object and attach them in its StartDraw method. If that won't work for you, next week we can add some StartDrag_ events that will let you attach items before the control starts tracking the modification.

Stoyan
  
Back to top
 
IP Logged
 
feugen24
YaBB Newbies
*
Offline



Posts: 27
Joined: Sep 22nd, 2006
Re: Moving Attached objects strange behaviour
Reply #2 - Sep 25th, 2006 at 7:52am
Print Post  
Hi,
I've attached them to mouse down event and now it works fine. Tks.
  
Back to top
 
IP Logged
 
feugen24
YaBB Newbies
*
Offline



Posts: 27
Joined: Sep 22nd, 2006
Re: Moving Attached objects strange behaviour
Reply #3 - Oct 17th, 2006 at 7:24am
Print Post  
Hi,
Ok...the attaching works fine but now I have another problem that I noticed...this occurs after detaching the boxes. Again there are strange flickers to all objects; exception is the object I resized; When I move a box over other boxes it does not draw them at all.
I tried to call "RecreateCacheImage()" at mouse up after detaching but it makes no difference.


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving Attached objects strange behaviour
Reply #4 - Oct 17th, 2006 at 8:05am
Print Post  
Do you detach the boxes from the MouseMove event handler?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving Attached objects strange behaviour
Reply #5 - Oct 17th, 2006 at 8:11am
Print Post  
Try detaching the boxes from the BoxModified event raised for the master box.

Stoyan
  
Back to top
 
IP Logged
 
feugen24
YaBB Newbies
*
Offline



Posts: 27
Joined: Sep 22nd, 2006
Re: Moving Attached objects strange behaviour
Reply #6 - Oct 17th, 2006 at 8:28am
Print Post  
I was detaching them at mouseUp....now works (at box modified). What was the problem with detaching at mouse up?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving Attached objects strange behaviour
Reply #7 - Oct 17th, 2006 at 11:09am
Print Post  
It was the opposite to the attaching problem - the items marked as being modified have their modification flag cleared just after raising the MouseUp event. So if you detach boxes from the MouseUp handler, the flowchart will not reach them while traversing the items being dragged, and won't clear their 'being-dragged' flag.

We could fix that by moving MouseUp raising code to the end of our OnMouseUp override, but this could lead to other problems.

Stoyan
  
Back to top
 
IP Logged
 
feugen24
YaBB Newbies
*
Offline



Posts: 27
Joined: Sep 22nd, 2006
Re: Moving Attached objects strange behaviour
Reply #8 - Oct 17th, 2006 at 11:34am
Print Post  
Hi,
Would be usefull mentioning this situations in the documentation...not change them.
Tks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint