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

Check the background color for the TreeViewAdv

I am trying to change the background color of the tree view during runtime. I tried to set the background color by changing this property, treeview.StandardStyle.Background. However, this only change the tree node and not the space below the tree node. Is this a bug or I need to call some other API to change the background color?

6 Replies

AD Administrator Syncfusion Team May 27, 2004 10:25 PM UTC

Hi Patrick, Set the TreeViewAdv''s BackColor property for this purpose. Let me know if this works for you. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team May 28, 2004 11:14 AM UTC

Hi Guru Patwal, I had tried this before and it doesn''t work for me. I found out what is wrong. I had set ThemesEnabled = true, and tree doesn''t allow me to set the background color. Is this a bug? thanks, Patrick


AD Administrator Syncfusion Team May 28, 2004 11:53 AM UTC

Hi Patrick, This is the intended behavior while using themes and not a bug. When themes are enabled, the drawing responsibility for the control is delegated to the underlying OS (so it ignores all the drawing related settings in the code). If the OS supports themes (like in Windows XP), the control is drawn using themes. Let me know if you need any other information. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team May 28, 2004 11:56 AM UTC

Is there any way I can override and paint the background color? The only way that I can set the background color is setting treeview.StandardStyle.Background property and half of the tree''s background is white.


AD Administrator Syncfusion Team May 31, 2004 09:34 PM UTC

Hi Patrick, I have requested the folks at the development team for their inputs on this issue, and will update you as soon as I hear from them. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team June 2, 2004 08:15 PM UTC

Hi Patrick, After further investigating this issue, I found out that the TreeViewAdv''s BackColor can be set even when the ThemesEnabled is true. You would have to set the TreeViewAdv''s IgnoreThemeBackground to true for this purpose. Please try this and let me know how it goes. Thanks for your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Up arrow icon