i would like to add that i don''t want to make the image fully transparent while the user move it .. but i want to make it 50% transparent ..
does SyncFusion support this ?
ADAdministrator Syncfusion Team June 21, 2005 10:08 AM
It is possible to change the tracking image drawn when moving a node, but the implementation is not exactly trivial. If you would like to try this on your own, the following outline should help you get started.
The tracking rectangle that you notice when a node is moved is drawn by the Essential Diagram MoveTool using the Syncfusion.Windows.Forms.Diagram.NodePathTracker class for the actual rendering. To change the tracking rectangle, you will have to first implement a custom MoveTool that creates a customized version of the NodePathTracker class from it''s IMouseEventReceiver.MouseMove() implementation. In your custom NodePathTracker, you will have to override the NodePathTracker.MouseMove method, and in place of the call to the View.DrawMouseTracker(Rectangle) method, you will instead invoke a custom method added to a subclass of the Diagram''s View that will render an alpha-blended outline of the image node.
The following Essential Diagram KB links shows how to replace a Diagram interactive tool with a customized one - http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=48.
The following KB article details how to subclass the Diagram View component - http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=31.
The following Essential Diagram KB link
MImidoJune 22, 2005 04:10 PM
it is working now ..
but i have a little problem ..
the images flicker while being dragged ..
any ideas on how to fix this ???
thanks a lot ..
ADAdministrator Syncfusion Team June 22, 2005 05:09 PM
Are you implementing the node tracking by shifting the node location? This is likely to cause the flickering that you have noticed, as changes to the node state will trigger off a redraw of the entire diagram model. Instead, you will have to use an approach similar to that used by the NodePathTracker and directly render the node into the View''s Graphics object as shown in the View.DrawMouseTracker() method. Hiding the node at the start off the move operation, and from then on drawing the node at the cursor''s current location in response to the mouse move event, and finally displacing the node to it''s final location and unhiding it will help you simulate node movement without any flicker.
MImidoJune 23, 2005 01:18 AM
thanks for your valuable support
I have noticed that the flicker exist in your syncfusion dashed rectangle too !! ..
btw,i have implemented it by drawing the images as you said by calling View.MyDrawTrackingImage in MyNodePathTracker.Move(dx,dy) .. not by moving the Nodes & i have the flickering :( ..
thanks a lot