Re: color of NSButton
Re: color of NSButton
- Subject: Re: color of NSButton
- From: email@hidden
- Date: Sat, 16 Feb 2002 13:22:00 -0800
Is there a way to change the color from blue to some other color?
In NSCell.h (and it's also defined on a few NSView subclasses) is:
- (void) setControlTint:(NSControlTint)controlTint;
NSControlTint is defined in NSCell.h as:
typedef enum _NSControlTint {
NSDefaultControlTint = 0, // system 'default'
NSClearControlTint = 7
} NSControlTint;
So you only have two choices: the default tint, which might be blue or
graphite in today's world, or graphite even if the system tint is blue.
Note that the values are 0 and 7; this might lead one to speculate that
other possibilities are planned for. :->
To toot my own horn a bit, you might look at Aquatint, at
http://www.sticksoftware.com/software/Aquatint.html. It will let you
make custom Aqua images in any color you like. You'll need to define a
stencil first, though; I guess if you want a more or less
standard-looking button, the stencil would be a sort of lozenge shape.
I would also note that for the colored buttons on my site,
www.sticksoftware.com, I had good success with taking snapshots of
buttons in IB, and then using GraphicConverter to change the colors as I
saw fit. It wouldn't be very easy to get those images back into
NSButtonCell, though, mostly because of alpha issues -- this was more
successful as a strategy for web buttons.
Good luck...
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.