RadApplicationMenu navigating by keyBoard in right to left mode

6 posts, 0 answers
  1. Payman
    Payman avatar
    3 posts
    Member since:
    Jan 2013

    Posted 22 Jan 2013 Link to this post

    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.

  2. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 23 Jan 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Payman
    Payman avatar
    3 posts
    Member since:
    Jan 2013

    Posted 30 Jan 2013 Link to this post

    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?
  5. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 01 Feb 2013 Link to this post

    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.
  6. Payman
    Payman avatar
    3 posts
    Member since:
    Jan 2013

    Posted 02 Feb 2013 Link to this post

    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

  7. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 06 Feb 2013 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready