• 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
How do I distinguish between radio and switch buttons?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I distinguish between radio and switch buttons?


  • Subject: How do I distinguish between radio and switch buttons?
  • From: "Alan Smith" <email@hidden>
  • Date: Thu, 7 Dec 2006 13:43:38 -0500

Hi everyone,

I want to know if a given NSButtonCell is a radio or switch button.
I've looked around a lot but can't figure out how to do this. There is
no - (NSButtonType)buttonType method for NSButton(Cell) which would do
the trick, if it existed.

Both the NSRadioButton and NSSwitchButton return 1 for highlightsBy
and showsStateBy so this does not help to differenciate between the
two. However, that does set them apart from the other button types so
I'm about half way there.

Thanks in advance, Alan.

PS. The method will have to work with "archived" buttons from nibs.
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: How do I distinguish between radio and switch buttons?
      • From: Michael Watson <email@hidden>
  • Prev by Date: Re: Displaying 2 images in a single cell of nstableview
  • Next by Date: Re: Displaying 2 images in a single cell of nstableview
  • Previous by thread: Re: Displaying 2 images in a single cell of nstableview
  • Next by thread: Re: How do I distinguish between radio and switch buttons?
  • Index(es):
    • Date
    • Thread