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.

controlnode backcolor

Thread ID:





65629 Jul 26,2007 05:55 PM Jul 27,2007 02:56 PM Windows Forms 2
Tags: Diagram
Giancarlo Aguilera
Asked On July 26, 2007 05:55 PM

Hi, I have a few questions I'm hoping someone can answer.

1) I have a controlnode that hosts a usercontrol. I have set the background color of the usercontrol to transparent with the hopes that the background color of the diagram with be shown instead. However, this is not happening. Please see attachment. Can you give me any tips on how to make this happen?

2) What do I need to do in order to prevent line connectors from being selected or have focus? In my case the user should only be able to select the node but not the lines.

Thanks much!


Giancarlo Aguilera
Replied On July 26, 2007 06:21 PM

forgot attachement


J.Nagarajan [Syncfusion]
Replied On July 27, 2007 02:56 PM

Hi GA,

Thanks for the update.

1. If you want to change the back color of the Windows control to Transparent then you could not change it to transparent. You can test this in an simple application. You can add a button control in a form and change the button's back color to transparent then it could not be changed to transparent. Similarly you can set transparent color to the control placed on a diagram. If you want to change the back color of the control node then please refer to the following code snippet

Button btn = new Button();
btn.Text = "Double Click to activate me";
btn.Click += new EventHandler( btn_Click );

ControlNode ctrlnode = new ControlNode( btn, new RectangleF( 100, 200, 150, 50 ) );
ctrlnode.HostingControl.BackColor = Color.Red;
this.diagram1.Model.AppendChild( ctrlnode );

2. If you want to prevent the selection of the connector then you can set its AllowSelect property to false. Please refer to the folloing code.


Please let me know if you have any questions.



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.