Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panels, Labels, GroupBox > Cues not shown on RadioButtons

Not answered Cues not shown on RadioButtons

Feed from this thread
  • Posted on Apr 8, 2011 (permalink)

    Hello,
    maybe somone can help me with this little problem.
    I have a Groupbox with several RadioButtens in it. Then I added a RadShortCut to the GroupBox and I want the first RadioButton in that GroupBox to be focused.
    This works in principle, the RadioButton gets the focus, but the cues are not shown for the focused RadioButton. This is not the expected behaviour, so the user cannot see that he has entered the GroupBox.
    Only when using the TAB key to move to the GroupBox the cues are shown. I want to show the cues programmatically. Is there an option to do that?
    I used the following code:
    Imports Telerik.WinControls
    Public Class Test4
         Private Sub Test4_Load(ByVal sender As ObjectByVal e As System.EventArgsHandles Me.Load
            ThemeResolutionService.ApplicationThemeName = "Desert"
             RadGroupBox1.HeaderText = "<html><u>R</u>adGroupBox1"
            RadGroupBox1.RootElement.Shortcuts.Add(New RadShortcut(Keys.Alt, Keys.R))
            AddHandler RadGroupBox1.RootElement.Click, AddressOf RadGroupBox1_Click
        End Sub
         Private Sub RadGroupBox1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles RadGroupBox1.Click
            RadRadioButton1.Focus()
        End Sub
    End Class

    Thank you for any hint.
    Cheers Roberto
    Attached files

    Reply

  • Stefan Stefan admin's avatar

    Posted on Apr 13, 2011 (permalink)

    Hello Roberto Wenzel,

    Thank you for writing.

    This is a known issue which is already logged into our PITS system and we will address it in one of our future releases.

    Meanwhile, you can inherit the RadRadioButton control and override its ShowFocusCues property to work around the issue. In addition, you should override the ThemeClassName property in order to enable themes for the inherited control:

    Public Class FocusCueButton
        Inherits RadRadioButton
     
        Protected Overrides ReadOnly Property ShowFocusCues As Boolean
            Get
                Return True
            End Get
        End Property
     
        Public Overrides Property ThemeClassName() As String
            Get
                Return GetType(RadRadioButton).FullName
            End Get
            Set(ByVal value As String)
     
            End Set
        End Property
    End Class

    Please let me know if this works for you.

    Best wishes,
    Stefan
    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

    Reply

  • Posted on Apr 15, 2011 (permalink)

    Hello Stefan,
    thank you very much for your help.
    Yes, Your solution works in general. Unfortunatelly I already have dozens of RadioButtons with handlers and code behind etc.
    It would be a lot of work to recreate everything. Maybe I wait for an official fix. Or is there a possibilty to convert my existing RadioButtons to the new 'FocusCueButton' ?
    Cheers Roberto

    Reply

  • Jack Jack admin's avatar

    Posted on Apr 20, 2011 (permalink)

    Hi Roberto,

    The easiest option in this case is to do a multiple Find - Replace in your project and replace all radio buttons with a FocusCueButton. Like Stefan said, this issue will be addressed in one of our upcoming releases.

    If you have any other questions, do not hesitate to contact us.
     
    Regards,
    Jack
    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panels, Labels, GroupBox > Cues not shown on RadioButtons
Related resources for "Cues not shown on RadioButtons"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]