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

Cues not shown on RadioButtons

3 Answers 111 Views
GroupBox
This is a migrated thread and some comments may be shown as answers.
Roberto Wenzel
Top achievements
Rank 2
Roberto Wenzel asked on 08 Apr 2011, 10:17 AM
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

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Apr 2011, 10:31 AM
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
0
Roberto Wenzel
Top achievements
Rank 2
answered on 15 Apr 2011, 07:58 AM
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
0
Jack
Telerik team
answered on 20 Apr 2011, 08:05 PM
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
Tags
GroupBox
Asked by
Roberto Wenzel
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Roberto Wenzel
Top achievements
Rank 2
Jack
Telerik team
Share this question
or