Basic context menu how-to?

4 posts, 0 answers
  1. gdijim
    gdijim avatar
    13 posts
    Member since:
    May 2007

    Posted 23 Jun 2007 Link to this post

    I've been using the control suite awhile and it's great -

    I was looking through the how-to's and was wondering if there is one on how to create and use a basic Radmenu context menu?

    The traditional menustripname.show() command doesn't work with the menu's I create, so I'm probably doing something wrong.

    Thanks!
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 25 Jun 2007 Link to this post

    Hi Jim,

    To create a context menu use the RadDropDownMenu. You can just drop a RadDropDownMenu from the toolbox to the design surface or create it trough code. To show the context menu trough API use this code:

    RadDropDownMenu menu = new RadDropDownMenu();

    menu.Items.Add(new RadMenuItem("Item 1"));
    menu.Items.Add(new RadMenuItem("Item 2"));
    menu.Items.Add(new RadMenuItem("Item 3"));

    menu.Show(Control.MousePosition);

     
    Sincerely yours,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. gdijim
    gdijim avatar
    13 posts
    Member since:
    May 2007

    Posted 25 Jun 2007 Link to this post

    Thanks a lot!!!

    Just adding these context menus will make the application pop even more than the other Telerik controls I've got.  Thanks so much for your time!!  I'll let you know how I fare.

    Jim

    Edit - The thing I was missing was I was trying to use the RadMenu bar instead of the RadDropDownMenu.  Talk about missing the forest for the trees!  Thanks a lot!
  5. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 25 Jun 2007 Link to this post

    You are welcome, gdijim, I am glad to have been of help.

    Let us know if you have other questions.
     

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top