• 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: Changing button title based on single or multiple selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing button title based on single or multiple selection?


  • Subject: Re: Changing button title based on single or multiple selection?
  • From: "stephen joseph butler" <email@hidden>
  • Date: Sat, 31 May 2008 00:04:22 -0500

On Fri, May 30, 2008 at 11:43 PM, Rick Mann <email@hidden> wrote:
> I'm sure this has been asked before, but a brief Google search didn't turn
> up anything.
>
> I have a button "Print Label". I would like it to say "Print Labels" when
> more than one label is selected in the Tree Controller view. Is it possible
> to do this with Alt. Titles and bindings in IB? Or must I write code?

Wild shot: bind the button title to the array controller's
selectedObjects key. Then, apply a custom NSValueTransformer that
returns the proper title (probably using NSLocalizedString) based on
the count of the objects passed in.
_______________________________________________

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: 
 >Changing button title based on single or multiple selection? (From: Rick Mann <email@hidden>)

  • Prev by Date: Changing button title based on single or multiple selection?
  • Next by Date: super respondsToSelector
  • Previous by thread: Changing button title based on single or multiple selection?
  • Next by thread: Re: Changing button title based on single or multiple selection?
  • Index(es):
    • Date
    • Thread