Re: Highlighting NSView used in NSStatusItem
Re: Highlighting NSView used in NSStatusItem
- Subject: Re: Highlighting NSView used in NSStatusItem
- From: Lorenzo Thurman <email@hidden>
- Date: Fri, 12 Oct 2007 09:27:01 -0500
Your custom view is responsible for drawing itself and providing its own
behaviors, such as processing mouse clicks and sending action messages.
Override the NSResponder's - (void)mouseDown:(NSEvent *)theEvent and
provide the necessary behavior.
- Apparao.
On Oct 12, 2007, at 8:40 AM, Lorenzo Thurman wrote:
I've figured out how to get my menu working when using an NSView in an
NSStatusItem, but I can't figure out how to get the view to highlight
when clicked. Yes, I've checked the archives and google, but I can't
find anything like what I'm doing. So if someone has any pointers, I'd
appreciate it thanks.
"Human beings are the only creatures that allow their children to come
back home."
--Bill Cosby
Lorenzo Thurman
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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
Thanks for the reply, but I guess what the necessary behavior is, is at
least part of my question. I already override mouseDown
to get the menu to display. I tried using drawing routines to fill the
view's rect with the systemhiglight color as a part of mouseDown, but
that came out looking pretty awful. What I got was my view being
completely overwhelmed by the hightlight color (which wasn't the correct
color anyway). The text which is part of my view did not 'invert' its
color and the view's image was completely obscured.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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