RadMenu Right Alignment

2 posts, 0 answers
  1. ShareDocs
    ShareDocs avatar
    76 posts
    Member since:
    Oct 2012

    Posted 04 Dec 2012 Link to this post


    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.

  2. Stefan
    Stefan avatar
    2891 posts

    Posted 07 Dec 2012 Link to this post

    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.
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. DevCraft R3 2016 release webinar banner
Back to Top