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

controlnode backcolor

Thread ID:

Created:

Updated:

Platform:

Replies:

65629 Jul 26,2007 09:55 PM UTC Jul 27,2007 06:56 PM UTC WinForms 2
loading
Tags: Diagram
Giancarlo Aguilera
Asked On July 26, 2007 09:55 PM UTC

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!

GA

Giancarlo Aguilera
Replied On July 26, 2007 10:21 PM UTC

forgot attachement


Doc122.zip

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

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.

lineConnector.EditStyle.AllowSelect=false;

Please let me know if you have any questions.

Thanks,
Nagaraj

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

;