button text won't disable/gray out
button text won't disable/gray out
- Subject: button text won't disable/gray out
- From: "William Zumwalt" <email@hidden>
- Date: Mon, 18 Jun 2007 19:41:07 -0500
I have a ToolbarDelegateCategory with the below code, but the problem
is that my images or the text below them doesn't gray out as if it
were not enabled. The icons and text appear from this code, but no
disabling. Even if I put the setEnabled: code in my controllers
awakeFromNib:, I still get the same results.
Anyone have an idea what I'm doing wrong here?
---
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
itemForItemIdentifier:(NSString *)itemIdentifier
willBeInsertedIntoToolbar:(BOOL)flag
{
NSToolbarItem *toolbarItem = [[NSToolbarItem alloc]
initWithItemIdentifier:itemIdentifier];
if ([itemIdentifier isEqualToString:@"Rain"]) {
[toolbarItem setLabel:@"Rain"];
[toolbarItem setPaletteLabel:[toolbarItem label]];
[toolbarItem setImage:[NSImage imageNamed:@"Sherlock.tiff"]];
[toolbarItem setTarget:self];
[toolbarItem setAction:@selector(rainCommands:)];
[toolbarItem setEnabled:NO];
}
return [toolbarItem autorelease];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden