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

RadMenu Right Alignment

1 Answer 96 Views
Menu
This is a migrated thread and some comments may be shown as answers.
ShareDocs
Top achievements
Rank 1
ShareDocs asked on 05 Dec 2012, 05:06 AM
Hello,

I have a radmenu control which has sub items.
When I am using certain font (like: Arial) the items has different alignment  (as you can see in the attach file).
Is there a way to make the alignment of all the items to the same start position.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Dec 2012, 02:04 PM
Hello Lior,

Thank you for contacting Telerik support.

The observed misalignment is caused by the incorrect font size that the font reports. Internally, we measure the desired font size in order to correctly position the item text, however, different fonts report different sizes which caused the miscalculation and the misalignment. This is a known issue in WinForms and there is no general approach to handle it.

What I can suggest for your case it to change the Font used. I believe that with Segoe UI 9, it should be a bit better. Another approach is if you are not going to change these items, to set some padding to the items:
radMenuItem2.Padding = new Padding(0, 0, -3, 0);
radMenuItem4.Padding = new Padding(0, 0, -13, 0);
radMenuItem5.Padding = new Padding(0, 0, -13, 0);
radMenuItem6.Padding = new Padding(0, 0, 4, 0);
radMenuItem7.Padding = new Padding(0, 0, -4, 0);

I hope this helps.
 
Regards,
Stefan
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.


Tags
Menu
Asked by
ShareDocs
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or