Re: Deactivating toolbar
Re: Deactivating toolbar
- Subject: Re: Deactivating toolbar
- From: j o a r <email@hidden>
- Date: Fri, 30 Aug 2002 07:07:00 +0200
Don't try to emulate the behaviour of the toolbar in the Finder - it is
not a true toolbar, but rather some hack that they put togehter before
toolbars were available in Carbon (that goes for a lot of things in the
Finder). At some point they will move to a standard toolbar and then it
will work like any other toolbar on the system.
That said, if you have strong reasons to do this you could always
listen for NSApplicationDidResignActiveNotification and
NSApplicationWillBecomeActiveNotification notifications (from
NSApplication) in order to change the validated state of your toolbar
items.
But again, I would recomend against doing this because you would have a
toolbar that works different than every other Cocoa toolbar on Mac OS X.
j o a r
On Friday, Aug 30, 2002, at 04:54 Europe/Stockholm, Andrew Merenbach
wrote:
I would like my application's toolbar to disable itself and turn gray
when my application is no longer the active one, much like the
Finder's toolbar works. I've tried putting this code into
validateToolbarItem:
if (![NSApp isActive]) {
return NO;
}
But when my application is not in front, validateToolbarItem: is only
called when the mouse moves over the toolbar. Additionally, this does
not disable the overflow menu, if there is one.
Is there an easy way to do this, or is it Finder-specific? (I've
noticed that Project Builder, for instance, does not display this
behavior.)
Take care,
Andrew Merenbach
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.