This is a migrated thread and some comments may be shown as answers.

How to set background color?

2 Answers 450 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 23 Sep 2010, 08:51 PM
We have tried setting the BackColor property of the RadDropDownList in both the designer and in the code behind.  Attempting to set the BackColor to a solid color (ie. this.RadDropDownList.BackColor = System.Drawing.Color.Red;) does not see to work.

We can't seem to find the correct property to set the background color of the RadDropDownList.  How can we set the background color on this control?

Thank you for any help and information you can provide.
Jeremy

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 24 Sep 2010, 09:35 AM
Hi, 

From memory, you can use the Visual Style Builder to do this. Or, if you just want to set it simply, then you would need to set Set Enable Theming to False. 
Hope that helps
Richard
0
Accepted
Peter
Telerik team
answered on 29 Sep 2010, 08:37 AM
Hi,

Thanks for the writing.

In case that you want to set the back color of the text box hosted in RadDropDownList you should use the following code snippet:
this.radComboBox1.DropDownListElement.TextBox.Fill.BackColor = Color.Red;
this.radComboBox1.DropDownListElement.TextBox.BackColor = Color.Red;
this.radComboBox1.DropDownListElement.EditableElement.BackColor = Color.Red;//For DropDownStyle = DropDownList

This can be also set via Visual Style Builder.

I hope this helps.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DropDownList
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Peter
Telerik team
Share this question
or