• 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: Mulit-state buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mulit-state buttons


  • Subject: Re: Mulit-state buttons
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 18 Oct 2007 16:00:29 -0400

> Hi guys. I need a button that can be toggled between an arbitrary set
> of states. I my app I have a NSPopup button with 6 items for x,y,z,-
> x,-y and -z. I want to replace it a button that will cycle through
> all six states (showing alternative text/icon) for each one, looping
> around at the first. Perhaps I'm missing something but none of the
> standard widgets seem capable of this, and a google search has turned
> up nothing. I used to be able to do this in PowerPlant.

  A view?! That's what cells are for! Have you seen this:

http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/Tasks/SubclassingNSCell.html

  You can create your own NSButtonCell class that keeps track of these
states ...

--
I.S.
_______________________________________________

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: Mulit-state buttons
      • From: Ari Benzane <email@hidden>
References: 
 >Mulit-state buttons (From: Ari Benzane <email@hidden>)

  • Prev by Date: Mulit-state buttons
  • Next by Date: predicate with NSDates
  • Previous by thread: Mulit-state buttons
  • Next by thread: Re: Mulit-state buttons
  • Index(es):
    • Date
    • Thread