Custom Symbol Edit Styles Failing...

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); } }

2 Replies

AD Administrator Syncfusion Team July 18, 2006 03:50 AM UTC

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.


DL David Llewellyn July 18, 2006 06:29 AM UTC

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

Loader.
Up arrow icon