We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drawing Node''s selection my own way ?

Thread ID:

Created:

Updated:

Platform:

Replies:

30501 Jun 19,2005 07:34 AM UTC Jun 23,2005 06:18 AM UTC WinForms 5
loading
Tags: Diagram
mido
Asked On June 19, 2005 07:34 AM UTC

here is what i want to do .. but i don''t know how !! I have ImageNode .. but i want it to be transparent while the user is moving it !! instead of the dashed rectangle ? how can i do this ?

mido
Replied On June 19, 2005 08:22 AM UTC

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 ? best regards, Seko

Administrator [Syncfusion]
Replied On June 21, 2005 03:08 PM UTC

Hi Seko, 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 Regards, Prakash Surendra Syncfusion Inc.,

mido
Replied On June 22, 2005 09:10 PM UTC

thanks alot 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 ..

Administrator [Syncfusion]
Replied On June 22, 2005 10:09 PM UTC

Seko, 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. Regards, Prakash Surendra Syncfusion Inc,

mido
Replied On June 23, 2005 06:18 AM UTC

hi Prakash, 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 best regards, Seko

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;