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

Control Node question

Thread ID:





38790 Dec 19,2005 04:05 PM UTC Dec 20,2005 02:26 AM UTC WinForms 2
Tags: Diagram
Chris C
Asked On December 19, 2005 04:05 PM UTC

I have a custom symbol that has a control node. However, I don''t want to display the control property in the property editor so I added the Browsable(false) attribute to my property. When I do this, the control is not created when I drag/drop my symbol. Instead, the control is not created until I click on either the symbol or the diagram. I tried this with the CustomListSymbol in the ControlsGalore sample and the same thing happens when I add the Browsable(false) attribute to the ListBoxControl property. How can I get the control node created when I drag/drop the symbol? Thanks in advance for your help. Chris C.

Administrator [Syncfusion]
Replied On December 19, 2005 10:09 PM UTC

Hi Chris, The Essential Diagram ControlNode type was failing to automatically create the child control for nodes for which the control data was being provided by the ControlNodeInfo event. In such cases it was the PropertyGrid''s attempt to display the child control''s properties that was forcing the control to get instantiated, and turning off the Browsable attribute was resulting in the child control not being created until a subsequent refresh. We have added a fix for the problem, and the next version of Essential Diagram will include the fix. For the time being you can workaround the condition by forcing the ControlNode to create the child control from within your ControlNodeInfo event handler. The following code should give you an idea, private void diagram1_ControlNodeInfo(object sender, Syncfusion.Windows.Forms.Diagram.ControlNodeEventArgs evtArgs) { if(evtArgs.EventInfo == ControlNodeEventInfo.GetChildControl) { if(evtArgs.Node.Parent is CustomListSymbol) { ControlNode ctrlnode = evtArgs.Node as ControlNode; ctrlnode.ControlAssemblyName = typeof(ControlsGalore.Form1).Assembly.FullName; ctrlnode.ControlClassName = "ControlsGalore.CustomListBox"; // Force the control to create itself ctrlnode.CreateControl(); } } } Thank you for bringing this problem to our attention. Prakash Surendra Syncfusion Inc.,

Chris C
Replied On December 20, 2005 02:26 AM UTC

Hi Prakash, Thanks once again for your quick response. The workaround you provided solved the problem. What is the anticipated release date for the next version of Essential Diagram? Chris


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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