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

Change highlight color when focus lost

Thread ID:

Created:

Updated:

Platform:

Replies:

129496 Mar 22,2017 08:10 AM UTC Mar 24,2017 12:46 PM UTC WinForms 3
loading
Tags: TreeViewAdv
Michael Lohr
Asked On March 22, 2017 08:10 AM UTC

Hello,

Is it possible to change the color of the selected TreeNodeAdv if the TreeViewAdv control looses
the focus?
Now it gets a ligth grey color and I would like to change it to blue. So that I get the same color independently if
the treeview has focus or not.

Best regards,
Michael

Kannan R [Syncfusion]
Replied On March 23, 2017 08:13 PM UTC

Hi Michael

 

Thank you for contacting Syncfusion support.

 

Yes, this reported requirement can be achieved by using properties named “HideSelection”, “InactiveSelectedNodeBackground” and “InactiveSelectedNodeForeColor” in TreeViewAdv. Please make use code snippet for your reference.

 

Code Snippet: [C#]

 

 

            this.treeViewAdv1.HideSelection = false;

            this.treeViewAdv1.InactiveSelectedNodeBackground = new Syncfusion.Drawing.BrushInfo(Color.MediumBlue);

            this.treeViewAdv1.InactiveSelectedNodeForeColor = Color.White;

 

 

We have also prepared sample for your reference and it can be downloaded from below location.

 

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/TREEVI~1-1415557400.ZIP

 

Screenshot:

 

 

Kindly check with the above solution and let us know if it helps

 

Regards

Kannan


Michael Lohr
Replied On March 24, 2017 07:35 AM UTC

Hi Kannan,

Thanks for your help.
I've missed this property. This works fine.

Best regards,
Michael

Mallika Kannan [Syncfusion]
Replied On March 24, 2017 12:46 PM UTC

Hi Michael, 
 
Thanks for your update. 
 
We are glad to hear that we have helped you in this. 
 
Please let us know if you have any concerns. 
 
Regards, 
Mallika   


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

;