Adjust padding to right of menu item

4 posts, 1 answers
  1. David A.
    David A. avatar
    126 posts
    Member since:
    Aug 2008

    Posted 26 Mar 2012 Link to this post

    Hi,
    I have a menu that has excess padding on the right of all my CommandBarDropDownButton menu items that for some of our users with low resolution, is causing problems with child menu items displaying.  Is there a way to reduce the amount of padding to the right of each menu item either through Visual Style Builder or through code? See image below for a visual.

    Thanks,
    David A.
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 29 Mar 2012 Link to this post

    Hi David,

    Thank you for writing.

    To reduce the space mentioned, you can set negative Padding to RadMenuItem either in Visual Style Builder, or in code. Here is a sample:
    radMenuItem2.Padding = new Padding(0, 3, -50, 0);

    Let me know if I can be of further assistance.

    Regards,
    Stefan
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. David A.
    David A. avatar
    126 posts
    Member since:
    Aug 2008

    Posted 29 Mar 2012 Link to this post

    Hi Stefan,

    Thank you for the suggestion but when I do this in Visual Style Builder under "RadMenu - Dropdown" it shrinks the width of the menu, but the arrows for child menu items no longer display and my shortcut text is truncated.  I tried changing the ArrowPrimitive and ShortcutTextprimitive padding but I just can't get it right.  Any way to make the entire menu "shrink" without truncating any other controls.  There just seems to be an inch worth of blank space after the longest menu item text.  I am using the Office2010Blue package by the way.

    Thank you,
    David A.
  5. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 03 Apr 2012 Link to this post

    Hello David,

    Thank you for writing back.

    In this case (having a shortcut and arrow for child items) the approach will be different. The setting should be introduced to the text element, rather than the whole menu item. Attached you can find an image, demonstrating where to introduce this setting in your theme.

    I hope this helps. Let me know if I can be of further assistance.

    Greetings,
    Stefan
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top