• 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
Re: Highlighting NSView used in NSStatusItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Highlighting NSView used in NSStatusItem
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Trouble using createFileAtPath method to create file
  • Next by Date: Re: Trouble using createFileAtPath method to create file
  • Previous by thread: Re: Highlighting NSView used in NSStatusItem
  • Next by thread: Re: Highlighting NSView used in NSStatusItem
  • Index(es):
    • Date
    • Thread