UseMnemonic in MenuItem

16 posts, 1 answers
  1. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Jun 2009 Link to this post

    Hello,
    I'd like to use an & in one of my menu items, but can't as UseMnemonic doesn't seem to be accessable. I have tried setting a TextPrimitive first and serting the text of the menu item to that, but that doesn't seem to work. I can't use && as this cuts off some of the text. How can I use UseMnemonic in the text property of a MenuItem?

    Thanks
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 04 Jun 2009 Link to this post

    Hello Chris Browning,

    RadMenu currently does not support mnemonics and accelerators. We do offer command bindings that you can use though.

    We are going to add mnemonics and accelerators to RadMenu (and other controls) in a future release -  unfortunately we cannot deliver them for Q2 2009, because this release is already planned out. Please excuse us for the introduced inconvenience.

     
    Kind regards,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    Hi,

    Can you tell me how command binding may help in this situation please?
    Thanks
  5. Nick
    Admin
    Nick avatar
    767 posts

    Posted 04 Jun 2009 Link to this post

    Hello Richard Slade,

    Command bindings can replace accelerators. They are bit more complex though. Please see the attached screenshot - I think that the screenshot is self-descripting, however, if you have further questions, do not hesitate to write me back.

    Greetings,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    I just want to be able to use an & in my Menu. I guess I'll have to do without,
    Thanks
  7. Nick
    Admin
    Nick avatar
    767 posts

    Posted 05 Jun 2009 Link to this post

    Hello Richard Slade,

    Thank you for your feedback. I will raise the priority of this feature for our future releases.

    Regards,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Ben
    Ben avatar
    28 posts
    Member since:
    Dec 2007

    Posted 07 Jun 2009 Link to this post

    I too have data in my database which contains '&' characters and wish to display this in a group box header. I presume I am also out of luck using the Telerik RadGroupBox control? Will UseMnemonic be added to RadGroupBox as well?
  9. Nick
    Admin
    Nick avatar
    767 posts

    Posted 10 Jun 2009 Link to this post

    Hi Ben,

    Thank you for contacting us. Using mnemonics in the header of RadGroupBox implies that the element can be chosen. When we were designing RadGroupBox, we considered this controls as a container that cannot get focus just like the standard one. However, it seems that we can extend RadGroupBox with mnemonics. We will certainly add mnemonics to RadMenu and will consider the opportunity of adding mnemonics to RadGroupBox.

    Kind regards,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Ben
    Ben avatar
    28 posts
    Member since:
    Dec 2007

    Posted 10 Jun 2009 Link to this post

    Hi Nick,

    I would tend to agree with you. However if I set the header text in a RadGroupBox header to "Here & There" the text is displayed as "Here _There". This is bad since it looks wrong and also gives the impression there is a shortcut that is somehow linked to that group box.

    Please advise.
    Ben
  11. Nick
    Admin
    Nick avatar
    767 posts

    Posted 11 Jun 2009 Link to this post

    Hello Ben,

    I see, please use the following code to turn off mnemonics:

    ((TextPrimitive)this.radGroupBox1.GroupBoxElement.Children[1].Children[2].Children[1]).UseMnemonic = false

    The issue will be fixed in Q2 2009 release. I have updated your Telerik points.

    Best wishes,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Ben
    Ben avatar
    28 posts
    Member since:
    Dec 2007

    Posted 11 Jun 2009 Link to this post

    Thanks Nick - that has done the trick.
  13. Ben
    Ben avatar
    28 posts
    Member since:
    Dec 2007

    Posted 12 Jul 2009 Link to this post

    Was this fixed for the 2009 Q2 release? I can't see it in there...
  14. Nick
    Admin
    Nick avatar
    767 posts

    Posted 13 Jul 2009 Link to this post

    Hello Ben,

    It seems fixed. Do you spot a bug somewhere?

    All the best,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  15. Ben
    Ben avatar
    28 posts
    Member since:
    Dec 2007

    Posted 13 Jul 2009 Link to this post

    Apologies Nick - I thought there was going to be a 'UseMnemonic" property added - but I guess that is not necessary in the group box control since they don't support shortcuts etc. I just tested it and it seems fine.

    Thanks.
    Ben
  16. Khizar Khan
    Khizar Khan avatar
    41 posts
    Member since:
    Jan 2010

    Posted 19 Jan 2011 Link to this post

    This also happening in RadMenuItem and RadDropdownButton.

    can you please advice of the above to set UseMnemonic as false.

    thanks and regards
    Khizar
  17. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 19 Jan 2011 Link to this post

    Hello,

    the following code shows how to turn this off in RadDropDownButton and RadMenuItem.
    ' to change on the RadDropDownButton
    CType(Me.RadDropDownButton1.DropDownButtonElement.ActionButton.Children(1).Children(1), TextPrimitive).UseMnemonic = False
    ' to change on a RadMenuItem
    CType(Me.RadMenuItem1.Children(2).Children(0).Children(1).Children(0), TextPrimitive).UseMnemonic = False

    Hope that helps
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready