Re: NSStatusItem: Can't set custom NSView and still have menu?
Re: NSStatusItem: Can't set custom NSView and still have menu?
- Subject: Re: NSStatusItem: Can't set custom NSView and still have menu?
- From: Tom Sutcliffe <email@hidden>
- Date: Fri, 25 Apr 2003 17:16:41 +0100
I have an NSStatusItem in my menu bar which contains a custom NSView.
I am now trying to set a menu that will drop down when the view is
clicked.
So what's up? Is this a Cocoa bug? (puts on flame-retardant suit) Is
there something else I need to do?
I believe setView and (setTitle, setImage, setMenu, setAction..) are
mutually exclusive. If you use a custom view then you have to implement
all of the statusitem's behaviour yourself, including dropping down
menus, and highlighting your view when it is clicked on etc. Which
lends weight to the whole MenuExtras argument I suppose.
Off the top of my head, a custom view subclassing NSPopupButton (of
type PullDown) might save you some time and give you the behaviour you
want.
Regards,
Tom
_______________________________________________
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.