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.

Custom Symbol Edit Styles Failing...

Thread ID:

Created:

Updated:

Platform:

Replies:

46632 Jul 17,2006 10:54 PM Jul 18,2006 02:29 AM Windows Forms 2
loading
Tags: Diagram
David Llewellyn
Asked On July 17, 2006 10:54 PM

Hello, I have created a custom symbol, which is used on the diagram control. I have set some of the EditStyle propeties of this Symbol, such as AllowResize. Unfortunately, this doesnt work and the symbol is still resizeable. I want to make this symbol a fixed size and would really like to be able to remove the 4 resizable squares that appear when the symbol is selected. I would also like to give the user the opportunity to move this symbol on the chart. Here is the code which I have for the custom symbol, but like I said before, the node is still resizeable. I hope somebody can help me with this. Thanks, David. public class DemoNode : Symbol, ISerializable { public DemoNode(int xLoc, int yLoc) { Ellipse elip = new Ellipse(xLoc, yLoc, 15, 15); this.LineStyle.LineWidth = 1; elip.FillStyle.Type = Syncfusion.Windows.Forms.Diagram.FillStyleType.LinearGradient; elip.FillStyle.ForeColor = System.Drawing.Color.Black; elip.FillStyle.Color = System.Drawing.Color.Transparent; this.EditStyle.AllowResize = false; this.AppendChild(elip); } }

Administrator [Syncfusion]
Replied On July 17, 2006 11:50 PM

Hi David, Thank you for using Syncfusion products. If your intension is not to allow the users from being resized, the way to go about this would be disable the EditStyle.AlloResize property within the Diagram.NodeClick event method. Kindly refer the following code snippet for your reference. private void diagram_NodeClick(object sender, NodeMouseEventArgs evtArgs) { if(evtArgs.Node is DemoNode) { DemoNode empSym = evtArgs.Node as DemoNode ; empSym.EditStyle.AllowResize = false; } } Please let us know whether this helps you. Thanks, Meera.

David Llewellyn
Replied On July 18, 2006 02:29 AM

Hello Meera, Thank you, thats exactly what I was after. You''re the best! Thank you, David.

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.

;