• 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: NSButton, Templates, images…
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButton, Templates, images…


  • Subject: Re: NSButton, Templates, images…
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 24 Jun 2014 16:06:45 -0700

On Jun 24, 2014, at 15:31 , Alex Kac <email@hidden> wrote:

> I’m sure I’m missing something simple.

> I have an NSButton with an image. I’d like to have the button look etched when unselected - and tinted blue when selected

It was a while back since I was missing the same thing. IIRC, what you need to do is:

1. Set your template image as *both* the standard and the alternate image.

2. Set the button’s *value* to 1 to get the alternate image — which will then have the blue highlight.

Currently, I don’t have any buttons that do this with images, but I use the same rules for text that turns blue when the button is “on”. Previously, I used this for a “play” button that had a black play icon when off, and a blue pause icon when on. That ability to use different images for the states is why you have to set the image twice.

_______________________________________________

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: 
 >NSButton, Templates, images… (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: NSButton, Templates, images…
  • Next by Date: Re: NSReleasePool issue
  • Previous by thread: Re: NSButton, Templates, images…
  • Next by thread: NSStrings to CStrings and hex encoding...
  • Index(es):
    • Date
    • Thread