4 Answers, 1 is accepted
0

Jay
Top achievements
Rank 1
answered on 06 Feb 2011, 09:50 PM
I found the solution :-)
((RadTextBoxItem)radTextBox1.RootElement.Children[0].Children[0]).BackColor = SystemColors.Control;
((RadTextBoxItem)radTextBox1.RootElement.Children[0].Children[0]).BackColor = SystemColors.Control;
0

Richard Slade
Top achievements
Rank 2
answered on 06 Feb 2011, 10:08 PM
Hi Jay,
The easiest way to change the BackColor is as follows
Hope that helps
Richard
The easiest way to change the BackColor is as follows
this
.radTextBox1.TextBoxElement.BackColor = SystemColors.Control;
Hope that helps
Richard
0
Hello guys,
Richard, setting the color of the TextBoxElement will indeed do the job. However, if Jay wants to place this code line in the constructor of the Form which contains the textbox, the better solution is to actually set the BackColor of the TextBoxItem:
Jay, in addition to the code line given above, it will be nice to set the BackColor of the Fill as well. This will allow you to achieve a consistent look:
I hope this helps.
Greetings,
Nikolay
the Telerik team
Richard, setting the color of the TextBoxElement will indeed do the job. However, if Jay wants to place this code line in the constructor of the Form which contains the textbox, the better solution is to actually set the BackColor of the TextBoxItem:
this
.radTextBox1.TextBoxElement.TextBoxItem.BackColor = SystemColors.Control;
Jay, in addition to the code line given above, it will be nice to set the BackColor of the Fill as well. This will allow you to achieve a consistent look:
this
.radTextBox1.TextBoxElement.Fill.BackColor = SystemColors.Control;
I hope this helps.
Greetings,
Nikolay
the Telerik team
0

Richard Slade
Top achievements
Rank 2
answered on 07 Feb 2011, 12:56 PM
Thank you for correcting me about this Nikolay. That makes sense.
Regards,
Richard
Regards,
Richard