Dock menu with indented items (like iTunes), how?
Dock menu with indented items (like iTunes), how?
- Subject: Dock menu with indented items (like iTunes), how?
- From: "Sean McBride" <email@hidden>
- Date: Mon, 6 Nov 2006 22:06:33 -0500
Hi all,
I'm trying to make some indented menu items in my app's dock menu, like
iTunes does:
"Now Playing"
"Artist"
"Song"
I'm using the code below, but it doesn't work. The "Artist" menu is
there, but not indented. One workaround is using '\t' or spaces, but
that seems lame. Any ideas?
- (NSMenu*)applicationDockMenu:(NSApplication*)sender
{
NSMenu* menu = [[[NSMenu alloc] initWithTitle:
@"Now Playing"] autorelease];
[menu addItemWithTitle:@"Now Playing" action:nil
keyEquivalent:@""];
NSMenuItem* item;
item = [[[NSMenuItem alloc] initWithTitle:@"Artist"
action:nil keyEquivalent:@""] autorelease];
[item setIndentationLevel:7];
[menu addItem:item];
return menu;
}
Thanks,
--
"When the winds of change are blowing, some people are building shelters
and others are building windmills" - Chinese proverb
_______________________________________________
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