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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ActivateStyle of Controls

Thread ID:

Created:

Updated:

Platform:

Replies:

42137 Mar 21,2006 07:17 AM UTC Mar 24,2006 01:23 PM UTC WinForms 4
loading
Tags: Diagram
Uli
Asked On March 21, 2006 07:17 AM UTC

Hi, I have a custom symbol with a control node. When I add my symbol to the diagram the ControlNode is active although I set the ActivateSytle.DoubleClick. How can I avoid that my ControlNode is active when I add it to the diagram? [code] public PLSeeButton(): base() { ControlNode node = new ControlNode(new RectangleF(10, 10, 120, 60)); node.ControlAssemblyName = "System.Windows.Forms"; node.ControlClassName = "System.Windows.Forms.Button"; node.ActivateStyle = ActivateStyle.DoubleClick; node.Name = "Button"; node.CreateControl(); Button btn = node.Control as Button; btn.Text = "Zweimal klicken zum aktivieren"; this.Name = "Button"; this.ControlNode = node; this.AppendChild(node); } void diagramComponent_ControlNodeInfo(object sender, ControlNodeEventArgs evtArgs) { ControlNode ctrlnode = evtArgs.Node as ControlNode; ctrlnode.DeactivateControl(); } [/code] with regards, uli

Administrator [Syncfusion]
Replied On March 23, 2006 01:03 PM UTC

Hi, To insert the Custom Symbol with a ControlNode use the InsertSymbolTool ,which is an interactive tool for adding custom symbol to the Diagram.It is the intended behaviour of the InsertSymbolTool to be active when added to the diagram. The insertion can be made by first creating and registering the InsertSymbolTool.Once the tool is registered we can add the Symbol to the Diagram using the ActivateTool(). Kindly, refer the ( Diagram.Windows\Samples\Technology\ControlsGalore ) Sample in particular the InsertTreeViewSymbol that would give you an idea about this implementation. Please let me know if this helps you. Regards, Praveena.

Administrator [Syncfusion]
Replied On March 24, 2006 08:10 AM UTC

Hi Praveena, thanks a lot for your reply. I have tested your solution but as you had already posted "... the intended behaviour of the InsertSymbolTool to be active when added to the diagram." the added Symbol is active (tested with a Button). My diagrammer is combination of the SymbolDesigner an the DiagramBuilder therefore I will add the Controls through the SymbolModel. Anyway, when I run into a workaround I will post it here. thank you again, Uli

Administrator [Syncfusion]
Replied On March 24, 2006 10:14 AM UTC

Hi, I would like to suggest you to use the SetPropertyCmd inorder to make the CustomSymbol to be inactive when added onto the Diagram. The SetPropertyCmd sets the value of the property in one or more nodes. I have created a sample that would help you to implement this. Kindly, refer the Sample and let me know if this helps you. Thanks, for your support to Syncfusion. Regards, Praveena.

ControlNodeSample.zip

Johann Schraml
Replied On March 24, 2006 01:23 PM UTC

Hi Praveena, your sample solves the problem. Thank you very much :-) ! Uli

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

;