Re: NSStatusItem
Re: NSStatusItem
- Subject: Re: NSStatusItem
- From: Adam Atlas <email@hidden>
- Date: Thu, 21 Mar 2002 12:12:02 -0500
Try making a custom view that does something like:
When drawing, check value of BOOL isDown. If YES, draw inverted image
and/or white text, otherwise draw normal image and/or black text.
On mouseDown, set isDown=YES and setNeedsDisplay:YES.
On mouseUp, set isDown=NO and setNeedsDisplat:NO.
On mouseDragged (or whatever that method is called) check if mouse is
still in bounds. If NO, blah, blah, blah. You know what i'm saying. :)
Then, I believe NSStatusItem has a setView:(NSView*)aView method. Call
it with an instance of your new view. Don't call setImage or anything,
just setView.
By the way, Apple's standard status items are actually Menu Extras, an
enhanced subclass of NSStatusItem, but it's a private API.
--
Adam Atlas
Atomm Software
http://www.atommic.com
_______________________________________________
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.