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.
Unfortunately, activation email could not send to your email. Please try again.

Orthogonal lines and line colors

Thread ID:

Created:

Updated:

Platform:

Replies:

66947 Aug 6,2007 08:04 AM Aug 6,2007 01:44 PM Windows Forms 1
loading
Tags: Diagram
Elia Chkayra
Asked On August 6, 2007 08:04 AM

hello,
I'm still using the SyncFusion diagram to draw rooms, i want to draw segments(lines) wich will be the room's wall.
When i activate the LineTool ( like you described in the samples) it only draws a black line.. i want to be able to draw a red line while am draging the cursor and when the mouse is up, the line drawed will return to it's black state.. i tried to use the linestyle property but it's useles

The attached zip contains a word doc wich shows exactly what i am trying to do with pictures.
I would be thankfull if you could help me in resolcing the issue

Sincerly, Elia Chkayra


diagram4.zip

J.Nagarajan [Syncfusion]
Replied On August 6, 2007 01:44 PM

Hi Elia,

Thanks for your interest in Syncfusion product.

If you want to change the color of the LineConnector while activating the LineTool, then you have customize LineTool and LineBase class. In the Mouse up event of LineTool class you can change the color of the link. Please refer to the following code snippet in CustomLineConnector class

public override Tool ProcessMouseUp( MouseEventArgs evtArgs )
{
CompleteAction( ptStart, ptEnd );
}
private void CompleteAction( PointF ptStart, PointF ptEnd )
{
Node node = CreateNode( ptStart, ptEnd );
node.LineStyle.LineColor = Color.Red;
}

//To activate the LineTool in MainForm.cs

MyLineTool linetool = new MyLineTool(this.diagram1.Controller);
this.diagram1.Controller.RegisterTool(linetool);
this.diagram1.Controller.ActivateTool(linetool);

I have attached the sample that demonstrates this completely. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F66947/main.htm

Please refer to it and let me know if you have any questions.

Regards,
Nagaraj



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.

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.

;