Re: NSMenuItem
Re: NSMenuItem
- Subject: Re: NSMenuItem
- From: Andrew Farmer <email@hidden>
- Date: Thu, 18 May 2006 12:09:47 -0700
On 17 May 06, at 06:13, Vasya Danylyshyn wrote:
newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]]
initWithTitle:@"My item" action:NULL keyEquivalent:[NSString
stringWithFormat:@"%C",NSPageUpFunctionKey]];
[newItem setKeyEquivalentModifierMask:NSNumericPadKeyMask];
this code, create menu item, with 'PageUp' key equivalent.
If i try use:
newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]]
initWithTitle:@"My item" action:NULL keyEquivalent:[NSString
stringWithFormat:@"%C",0x0020]];
[newItem setKeyEquivalentModifierMask:NSNumericPadKeyMask];
(where 0x0020 - space character)
the menu no contains 'SPACE' key equivalent :(
That's correct. The menu routines don't support the display of the
space bar as a key. iTunes works around this by setting the menu item
title to something like
"Play space"
However, this doesn't always quite work right; the alignment is a
little bit off.
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden