I'm using RadControls for WinForms Q2 2011 (version 2011.2.11.831) and would like to highlight the Checkbox when it has focus to make it easier for my users to find the focused field. I have code working with the Enter/Leave events for RadButtons and RadDropDownLists but am unable to get it working for the RadCheckBox. I've tried using the BackColor/ForeColor properties of the ButtonElement.ButtonFillElement object but to no avail.
Here is my class code for the RadButton:
How can I do a similar effect for the RadCheckBox.
Secondly, I'd actually like to not hard code the colors, but to use the Selected Text Color of the TextBox (I'm assuming this comes from the Theme in use). How do I access the information ?
Thanks,
Chet
Here is my class code for the RadButton:
this.Enter += new EventHandler(BaseButton_Enter);
this.Leave += new EventHandler(BaseButton_Leave);
void BaseButton_Enter(object sender, EventArgs e)
{
this.ButtonElement.ButtonFillElement.BackColor = Color.Blue;
this.ButtonElement.ForeColor = Color.White;
this.ButtonElement.ButtonFillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
}
void BaseButton_Leave(object sender, EventArgs e)
{
this.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
this.ButtonElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local);
this.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
}
How can I do a similar effect for the RadCheckBox.
Secondly, I'd actually like to not hard code the colors, but to use the Selected Text Color of the TextBox (I'm assuming this comes from the Theme in use). How do I access the information ?
Thanks,
Chet