• 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: NSPopupButton on Toolbar with Image instead?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopupButton on Toolbar with Image instead?


  • Subject: Re: NSPopupButton on Toolbar with Image instead?
  • From: "Mitchell Hashimoto" <email@hidden>
  • Date: Tue, 15 Jan 2008 12:18:04 -0800

Hi Peter,

I looked this up and the SegmentedControl looks perfect if I could get
rid of the bezel. I'm not sure exactly how to do this by ovverriding
drawRect... could you please expand upon this a little bit more? Thank
you!

On Jan 15, 2008 11:30 AM, Peter Ammon <email@hidden> wrote:
>
> On Jan 15, 2008, at 9:45 AM, Mitchell Hashimoto wrote:
>
> > Hello,
> >
> > I'm trying to get the XCode style contextual menu to popup when a
> > button is clicked on my toolbar (such as the "Build" button if you
> > hold it), but I can't figure out exactly how to do this!
> >
> > Should I be subclassing NSPopupButton? NSButtonCell? Is there an
> > easier way for me to do this?
>
> Hi Mitchell,
>
> I'd say the easiest way to do this is with a single segment,
> momentary style NSSegmentedControl.  You can assign both a menu and
> an action to the control to get this behavior.  Because segmented
> controls always draw their bezels, you should override drawRect: if
> you want it to look like Xcode's buttons.
>
> I hope that helps,
> -Peter
>
>
_______________________________________________

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

References: 
 >NSPopupButton on Toolbar with Image instead? (From: "Mitchell Hashimoto" <email@hidden>)
 >Re: NSPopupButton on Toolbar with Image instead? (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: NSWindow and autorelease with dynamic binary
  • Next by Date: Fwd: CAAnimation working with float, but not with int?
  • Previous by thread: Re: NSPopupButton on Toolbar with Image instead?
  • Next by thread: Re: NSPopupButton on Toolbar with Image instead?
  • Index(es):
    • Date
    • Thread