This is a migrated thread and some comments may be shown as answers.

Adjust padding to right of menu item

3 Answers 225 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
David A.
Top achievements
Rank 1
David A. asked on 26 Mar 2012, 07:10 PM
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.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Mar 2012, 04:45 PM
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 >>
0
David A.
Top achievements
Rank 1
answered on 30 Mar 2012, 02:05 AM
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.
0
Accepted
Stefan
Telerik team
answered on 03 Apr 2012, 01:16 PM
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 >>
Tags
CommandBar
Asked by
David A.
Top achievements
Rank 1
Answers by
Stefan
Telerik team
David A.
Top achievements
Rank 1
Share this question
or