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. Image for the cookie policy date

Change highlight color when focus lost

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

3 Replies

KR Kannan R Syncfusion Team 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



ML Michael Lohr March 24, 2017 07:35 AM UTC

Hi Kannan,

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

Best regards,
Michael


MK Mallika Kannan Syncfusion Team 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   


Loader.
Live Chat Icon For mobile
Up arrow icon