• 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: Creating NSButton in Code does not set controlTint to currentControlTint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating NSButton in Code does not set controlTint to currentControlTint


  • Subject: Re: Creating NSButton in Code does not set controlTint to currentControlTint
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 28 Dec 2013 15:05:42 +0100

On 28 Dec 2013, at 14:39, Uli Kusterer <email@hidden> wrote:
>> To repeat… I expected the above code to produce a button which when pressed displays the Blue Aqua tint. It doesn't! Why not?
>> Why does it show the Aqua tint if I set up the exact same button using IB and let it be instantiated from the nib?
>> Because that's where I got the information for the above set… statements. In my naiveté I assumed I would get the same behaviour.
>
> What are you trying to achieve with all this? What do you mean by “display the blue aqua tint”? I think you’re misunderstanding the terminology. The tint is a color that is used for accents on *some* controls to make important parts stand out more, and to show whether a button is clickable even when its window is inactive. On pushbuttons, the tint was ever only used for the default button (the one that reacts to the return key) and for click-highlighting a button. The OS does that correctly and automatically, there is no reason for you to change this. The tint is *not* a way to theme a button or give it a particular color.

 Are you perhaps trying to implement “sticky” buttons? I.e. buttons that toggle between on and off when clicked? These haven’t highlighted in blue for a long time, but may have in 10.1 or earlier, I’m not sure anymore. Anyway, if you want that, that depends on the button type. I see you’re setting that to NSToggleButton. A toggle button only changes the image/alt image when clicked. Maybe you want NSPushOnPushOff button, which according to the docs highlights the button when pressed, too? This highlight is usually grey, not in the control tint, but maybe that’s what you’re looking for?

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


_______________________________________________

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: Creating NSButton in Code does not set controlTint to currentControlTint
      • From: Kyle Sluder <email@hidden>
References: 
 >Creating NSButton in Code does not set controlTint to currentControlTint (From: Peter Teeson <email@hidden>)
 >Re: Creating NSButton in Code does not set controlTint to currentControlTint (From: Uli Kusterer <email@hidden>)
 >Re: Creating NSButton in Code does not set controlTint to currentControlTint (From: Peter Teeson <email@hidden>)
 >Re: Creating NSButton in Code does not set controlTint to currentControlTint (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Ugly Inspector Bar in TextView
  • Next by Date: Re: Should copy + paste change characters?
  • Previous by thread: Re: Creating NSButton in Code does not set controlTint to currentControlTint
  • Next by thread: Re: Creating NSButton in Code does not set controlTint to currentControlTint
  • Index(es):
    • Date
    • Thread