• 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: Trouble Subclassing NSButtonCell for Buttons in a nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble Subclassing NSButtonCell for Buttons in a nib


  • Subject: Re: Trouble Subclassing NSButtonCell for Buttons in a nib
  • From: j o a r <email@hidden>
  • Date: Mon, 23 May 2005 10:56:46 +0200


On 23 maj 2005, at 10.30, Arshad Tayyeb wrote:

That sure helped make my text red (in awakeFromNib, I added:
[[self cell] setAttributedTitle:attrStr];
But, I lose the ability to control the button background:
[[self cell] setBackgroundColor:[NSColor colorWithCalibratedRed:.8 green:.1 blue:.1 alpha:.75]];
Does not work. The docs say it only works with borderless buttons... I've tried the different bezel styles, none of them work. I feel like to really control the drawing, I'd want to subclass NSButtonCell, so I'm still pretty curious to understand why that isn't working.

If there is an attributed title, it probably overrides any background color property you might have set on the button. You could try to set the background property of the attributed string, but I kind of doubt that it would work. Back to square one in that case...


j o a r



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Trouble Subclassing NSButtonCell for Buttons in a nib (From: Arshad Tayyeb <email@hidden>)
 >Re: Trouble Subclassing NSButtonCell for Buttons in a nib (From: j o a r <email@hidden>)
 >Re: Trouble Subclassing NSButtonCell for Buttons in a nib (From: Arshad Tayyeb <email@hidden>)

  • Prev by Date: Re: Trouble Subclassing NSButtonCell for Buttons in a nib
  • Next by Date: RE: "Reveal Drawer" button in title bars
  • Previous by thread: Re: Trouble Subclassing NSButtonCell for Buttons in a nib
  • Next by thread: Adding custom keys to protocols
  • Index(es):
    • Date
    • Thread