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

RadApplicationMenu navigating by keyBoard in right to left mode

5 Answers 115 Views
ApplicationMenu
This is a migrated thread and some comments may be shown as answers.
Payman
Top achievements
Rank 1
Payman asked on 22 Jan 2013, 07:19 AM
Hi,

I have a requirement to navigate RadApplicationMenu by keyboard on right to left application.
i set RadApplicationMenu right to left property to true, the menu bar items move arrange in right to left mode but by keyboard navigating in run mode it move reverse , when i press left arrow key selected menu item move to next right item and when i press right arrow key selected menu item move to next left item. why?

how can i do this?
Thank you in advance.

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 23 Jan 2013, 08:40 AM
Hi Payman,

Thank you for writing.

I can confirm that RadMenu and in particular RadApplicationMenu does not behave correctly in this case. I have added this as a bug report to our Public Issue Tracking System. Feel free to add your vote for it here: http://www.telerik.com/support/pits.aspx#/public/winforms/14075

In the attached a sample demo application you can find how to work around this case. We will do our best to address this issue in our next major release.

I have updated your Telerik Points for this request.

I hope that you find this information useful. 

Kind regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Payman
Top achievements
Rank 1
answered on 31 Jan 2013, 05:23 AM
Hi Plamen
Thank you for answering

what is your idea for replacing left arrow with right and replace right arrow with left , by code?

by the way
it just an idea, how can i do that?
0
Plamen
Telerik team
answered on 01 Feb 2013, 12:41 PM
Hello Payman,

Thank you for writing.

The idea, which I have implemented in my previous post, was to change the keyboard navigation support. Your supplied information helped me to notice that the Left and Right keyboard navigation works the same like in default mode (RightToLeft = false). In order to change this logic, I override the ProcessLeftRightNavigationKey method and check if the control is in RightToLeft mode and modify the arguments so that the left key is handled as the right key and vice versa:
return base.ProcessLeftRightNavigationKey(this.RightToLeft == System.Windows.Forms.RightToLeft.No ? isLeft : !isLeft);

If you have additional questions, do not hesitate to write back.

All the best,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Payman
Top achievements
Rank 1
answered on 02 Feb 2013, 10:11 AM
Hi Plamen

i'm So glad you're not upset of my basic questions( hopefully)

can i ask you on witch control you override ProcessLeftRightNavigationKey method?

this is my steps to create my solution to have RighToLeft RadMenu:
-add new RadForm
-add RadMenu from toolbar
-set RightToLeft property of RadForm & RadMenu to true( menu & form direction change to right to left mode)
-add some RadMenuItem
now i'm trying to override ProcessLeftRightNavigationKey method:

protected override bool ProcessLeftRightNavigationKey(bool isLeft)
{
      return base.ProcessLeftRightNavigationKey(this.RightToLeft == System.Windows.Forms.RightToLeft.No ? isLeft : !isLeft);
}

unfortunately, i can't. where did i put this code VS show me an error.

by theway, thank you very much Plamen, i'm wasting your time

0
Plamen
Telerik team
answered on 06 Feb 2013, 07:25 PM
Hello Payman,

My example was specific for RadApplicationMenu and I added this method in MyApplicationMenuDropDown class which inherits from RadApplicationMenuDropDown. This class is specific for RadApplicationMenu control. You will NOT be able to use the same technique for RadMenu where several methods should be extended in order to achieve consistent behavior. I logged this issue in our issue tracking system and we will address it in a future version.

Kind regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
ApplicationMenu
Asked by
Payman
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Payman
Top achievements
Rank 1
Share this question
or