Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom menu shortcuts not aligned (VBA/Excel 2003)

    I have this custom made Excel menu, and I just noticed that the menu shortcuts are not aligned. Not a big thing, I agree, but irritating, Microsoft-unpretty it is. I enclosed a pic.

    Especially ugly is the obvious difference between the position of F4 and F6. Adding or deleting space between "..." and "F4" in .Caption = "&Donation in the Active Row... F4" does not help. What does?
    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    Please excuse me, but in what way are F4 and F6 misaligned?

  3. #3
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    Well, F4 is maybe a pixel or so more to the left than F6. Use the edge of Notepad or something and see for yourself. Though, naked eye is enough.

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    If you can, try to rename the menu command to the same as the F6 one, and see if it is not simply the width of characters that is throwing it out. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Regards,
    Rudi

  5. #5
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    I just did it, although I did not have to do it to know that that was what it's about, but it's still ugly and I ask the same question: how to make it look right? [img]/forums/images/smilies/smile.gif[/img]

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    OK, I see it now, but I wouldn't have noticed it if it hadn't been pointed out to me. I checked the built-in menu shortcuts in some applications, and they're not always perfectly aligned either (I found differences of up to 3 pixels). I don't think there's anything you can do about it - it must be a limitation of the algorithm that calculates the placement of the shortcuts.

  7. #7
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    Thanx Hans.

    Somebody please tell this to Steve Jobs.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    Mac OS may well have a different (perhaps better) algorithm for calculating this than Windows. I haven't used a Macintosh for almost 10 years, so I don't remember if the problem occurred there.

  9. #9
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    I'd bet it didn't.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    My guess is that the shortcuts aren't positioned graphically, but that the algorithm inserts spaces between the caption and the shortcut to assemble the complete string. Since a space is several points wide, it is impossible to get perfect alignment this way. But I have no proof or references for this assumption.

  11. #11
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom menu shortcuts not aligned (VBA/Excel 2003)

    It shows a bit less when you insert other menu item in between.

    Dang those slugs! <img src=/S/anigrin.gif border=0 alt=anigrin width=19 height=19>
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •