Separator on Menu

5 posts, 0 answers
  1. William
    William avatar
    55 posts
    Member since:
    Sep 2008

    Posted 21 Dec 2008 Link to this post

    I'm using a RadMenu and I have added two Separators.  How can I give them some type of visual appearance?  The separators added a small amount of additional space beween menu items but does not give any type of visual.  Do I need to add an image? What I would like to have is something close to "|" display.

  2. John
    John avatar
    30 posts
    Member since:
    Aug 2008

    Posted 21 Dec 2008 Link to this post

    William,
        The Separators provide a visual bar for the horizontal menus by default so I am guessing you are doing this within the top level menu.  So a Separator added to the top level menu will add the spacing between menu items that you mentioned seeing.  One alternative to accomplish what you described with the "|" visual, you would need to use a RadMenuItem with an image then set the Enabled property to False so the user cannot click the menu entry. 

    Hope this helps,
    John
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 22 Dec 2008 Link to this post

    Hi John,

    Thank you for your question.

    To add a visual appearance of the separator you should only set the ShouldPaint property to "true". This will make the separator visible and you will be able to customize its appearance.

    Do not hesitate to write back if you have further questions.

    Sincerely yours,
    Deyan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Kevin
    Kevin avatar
    4 posts
    Member since:
    Aug 2011

    Posted 26 Jul 2012 Link to this post

    Hi,

    My menu items are table driven, i.e. one item per record. How do I add seperators to group them into logical groups?
  6. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 30 Jul 2012 Link to this post

    Hello Kevin,

    Thank you for writing.

    Your account indicates that you are using only our ASP.NET AJAX tools. Please note that this section of the forum concerns the WinForms version of RadMenu. In case you questions is about the ASP.NET AJAX version, please post in the corresponding forum section.

    In case your question concerns the WinForms version, you can simply add a RadMenuSeparatorItem to your menu items:
    RadMenuItem myMenuItem = new RadMenuItem("My Items");
    this.radMenu1.Items.Add(myMenuItem);
     
    foreach (var group in myGroups)
    {
        foreach (var item in group.Items)
        {
            myMenuItem.Items.Add(new RadMenuItem(item.ToString()));
        }
     
        myMenuItem.Items.Add(new RadMenuSeparatorItem());
    }

    Hope this helps. Do not hesitate to contact us if you have further questions.

    Greetings,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready