• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
button text won't disable/gray out
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: button text won't disable/gray out
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: making a screen dump app
  • Next by Date: Re: Why the need for the id type?
  • Previous by thread: Re: making a screen dump app
  • Next by thread: Re: button text won't disable/gray out
  • Index(es):
    • Date
    • Thread