• 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: How to change a Push Button's Color?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change a Push Button's Color?


  • Subject: Re: How to change a Push Button's Color?
  • From: Ryan Stevens <email@hidden>
  • Date: Sat, 22 Oct 2005 11:15:25 -0700

On Oct 22, 2005, at 9:43 AM, Andreas Mayer wrote:


Am 22.10.2005 um 18:16 Uhr schrieb Matthew Rajca:


How can I change a Push Button's Color?


An Aqua-style button? You can't.


That's not entirely true. There are no built-in methods for it but you can get it done with a little work.


subclass NSButtonCell and add something not unlike this..

// disclaimer; from my vault of unfinished projects, modified in Mail, etc.
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *) controlView
{
[super drawInteriorWithFrame:cellFrame inView:controlView];


       [[[NSColor greenColor] colorWithAlphaComponent:0.9] set];
        NSRectFillUsingOperation(cellFrame, NSCompositePlusLighter);
}
_______________________________________________
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: 
 >How to change a Push Button's Color? (From: Matthew Rajca <email@hidden>)
 >Re: How to change a Push Button's Color? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Name of current function/selector
  • Next by Date: Re: Cocoa UI in carbon plug-in?
  • Previous by thread: Re: How to change a Push Button's Color?
  • Next by thread: Core Data - Initializing with standard data
  • Index(es):
    • Date
    • Thread