When I do this I right-align the shorcut. Take a look at Office and VS.net menus and you'll see that that's what MS are doing too. The problem with left aligning in seperate columns is that you must know the longest menuitems text and the longest shortcut text in a popupmenu before your OnMeasureItem method runs. This also results in longer menus and wasted space as demonstrated below.
Left aligned text + right aligned shortcut
----------------------------------------------
Short Text Ctrl+Shift+Ins |
And a much longer string in a menu item Ins |
----------------------------------------------
Left aligned text + left aligned shortcut in second column
---------------------------------------------------------
Short Text Ctrl+Shift+Ins |
And a much longer string in a menu item Ins |
---------------------------------------------------------
p.s. I sent this in html format with a fixed-width font for display purposes.
--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...ate/menus.html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004