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.

Check the background color for the TreeViewAdv

Thread ID:





14496 May 27,2004 12:24 PM Jun 2,2004 04:15 PM Windows Forms 6
Tags: Tools
Asked On May 27, 2004 12:24 PM

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?

Administrator [Syncfusion]
Replied On May 27, 2004 06:25 PM

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.

Administrator [Syncfusion]
Replied On May 28, 2004 07:14 AM

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

Administrator [Syncfusion]
Replied On May 28, 2004 07:53 AM

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.

Administrator [Syncfusion]
Replied On May 28, 2004 07:56 AM

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.

Administrator [Syncfusion]
Replied On May 31, 2004 05:34 PM

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.

Administrator [Syncfusion]
Replied On June 2, 2004 04:15 PM

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.


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.