Re: How to change a Push Button's Color?
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