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

RTL MessageBox Arrow Navigation

1 Answer 186 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 04 Jul 2012, 08:24 AM

Hi,
We are using WinForms RAD Controls (Q1 2012). We noticed strange behavior when navigating between message box buttons with keyboard arrow keys. When message box shown, YES button has focus. On left arrow key press both buttons lose focus, additional Left Arrow press set focus to NO button. The same behavior in opposite direction. Tab key navigation behaves as expected. It seems that there is some UI element, receiving focus in tab order between YES and NO buttons.
It appears that this is very annoying behavior for our end users.

 Any idea will be appreciated


Following code used to show message box:
DialogResult result = RadMessageBox.Show(null, "text", "title",
    MessageBoxButtons.YesNo, RadMessageIcon.None, MessageBoxDefaultButton.Button1, RightToLeft.Yes);

Regards,
Leon

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Todorov
Telerik team
answered on 06 Jul 2012, 04:42 AM
Hi Leon,

Thank you for contacting us.

I agree that this behavior is not correct. Therefore, I have logged it in our Public Issue Tracking System and we will address it in a future release. Here you can find the PITS entry. For the time being, you can use the following code as a workaround:
private void radButton1_Click(object sender, EventArgs e)
{
    Form1.SetStyle(RadMessageBox.Instance.Controls[1], ControlStyles.Selectable, false);
    DialogResult result = RadMessageBox.Show(null, "text", "title",
        MessageBoxButtons.YesNo, RadMessageIcon.None, MessageBoxDefaultButton.Button1, RightToLeft.Yes);
}
 
public static void SetStyle(System.Windows.Forms.Control control, ControlStyles styles, bool newValue)
{
    object[] args = { styles, newValue };
    typeof(System.Windows.Forms.Control).InvokeMember("SetStyle",
        BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod,
        null, control, args);
}

Your Telerik points have been updated for bringing this issue to our attention.

Feel free to ask if you have any further questions.

All the best,
Ivan Todorov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
MessageBox
Asked by
Leon
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or