• 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: Pull-down menu weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pull-down menu weirdness


  • Subject: Re: Pull-down menu weirdness
  • From: Keith Blount <email@hidden>
  • Date: Mon, 17 Jul 2006 12:18:29 -0700 (PDT)

Hi, nope, not being dense - I was surprised I had to
jump through these hoops just to achieve something so
simple myself. The main (but but not sole) reason
subclassing is required, however, is that
NSPopUpButton does not support the graying on/off
state of an NSButton. When you click the "action"
button in Mail.app, the button turns grey when the
menu appears. There is no way to support this in a
standard NSPopUpButton that I can see (you can see
that the buttons used in the MenuMadness example
appear quite dead and do not gray).

There is an old post about similar issues here:
http://www.cocoabuilder.com/archive/message/2005/2/1/127252

Notably, looking in the .nib file of Mail.app, the
action button appears to be a plain, non-subclassed
NSPopUpButton; however, I have no idea how they
achieved the behaviour they did without subclassing.

Hope that makes things a little clearer...

--- Matt Neuburg <email@hidden> wrote:

> On or about 7/17/06 10:46 AM, thus spake "Keith
> Blount"
> <email@hidden>:
>
> > My problem was merely that I
> > required a pull-down list (because an action
> button
> > should be used for a menu of actions, whereas a
> pop-up
> > list is for selecting an item), but, because I am
> > using an image instead of a title, I didn't want
> the
> > pull-down list to eat up the first item in its
> given
> > menu for its title (which wouldn't get shown, and
> > which is the default behaviour for a pull-down
> list as
> > opposed to a pop-up list). Hope that explains my
> > initial question more clearly...
>
> Sorry if I'm being dense, but I'm just not
> understanding why this requires
> jumping through all these hoops. In the MenuMadness
> example, there are
> various kinds of menu emerging from images, and no
> subclassing is needed.
> Once the menu is set up, that's that. (And yes, of
> course a dummy item is
> used as the first item.) Perhaps if you compared
> what you're trying to do to
> what MenuMadness already shows how to do...? m.
>
> --
> matt neuburg, phd = email@hidden,
> http://www.tidbits.com/matt/
> pantes anthropoi tou eidenai oregontai phusei
> AppleScript: the Definitive Guide - Second Edition!
> http://www.amazon.com/gp/product/0596102119
> Take Control of Word 2004, Tiger, and more -
>
http://www.takecontrolbooks.com/tiger-customizing.html
> Subscribe to TidBITS! It's free and smart.
> http://www.tidbits.com/
>
>
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Pull-down menu weirdness
      • From: Matt Neuburg <email@hidden>
References: 
 >Re: Pull-down menu weirdness (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Re : Newbie Q : using a framework
  • Next by Date: Re: Pull-down menu weirdness
  • Previous by thread: Re: Pull-down menu weirdness
  • Next by thread: Re: Pull-down menu weirdness
  • Index(es):
    • Date
    • Thread