RadCheckBox focus by tab

2 posts, 0 answers
  1. Kuba
    Kuba avatar
    13 posts
    Member since:
    Aug 2013

    Posted 11 Mar 2014 Link to this post

    I would like to achieve highlight of checkbox to be the same as mouse hover when I focus on checkbox with tab button. VisualStyleBuilder doesn't support this (or I just can't see this option). How can I achieve my goal?
  2. Dimitar
    Dimitar avatar
    2983 posts

    Posted 14 Mar 2014 Link to this post

    Hi Kuba,

    Thank you for writing.

    You cannot achieve you goal with Visual Style Builder, but you can change the style in code. For example you can subscribe to the GotFocus and LostFocus events and change the BackColor there:
    void radCheckBox1_LostFocus(object sender, EventArgs e)
        radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
        radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.ResetValue(LightVisualElement.BackColor2Property, Telerik.WinControls.ValueResetFlags.Local);
    void radCheckBox1_GotFocus(object sender, EventArgs e)
        radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.BackColor = Color.DarkGray;
        radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.BackColor2 = Color.Gray;

    Let me know if you have additional questions.


    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top