Re: NSButton darkens background when pressed
Re: NSButton darkens background when pressed
- Subject: Re: NSButton darkens background when pressed
- From: Glen Simmons <email@hidden>
- Date: Wed, 3 Mar 2004 08:53:41 -0600
On Mar 3, 2004, at 8:23 AM, Jeremy Dronfield wrote:
On 2 Mar 2004, at 4:06 pm, Glen Simmons wrote:
I'm using NSButtons with no border and with the "Momentary Change"
behavior set in IB and my own graphics for the "up" and "down"
states. The problem is that NSButton takes it upon itself to darken
its rect when it's pressed and I don't want that. I've fiddled with
the button's NSButtonCell using -setHighlightsBy: and
-setShowsStateBy: to no avail.
Any idea how to restrain this behavior?
This shouldn't happen. I find that the following settings work:
[[myButton cell] setHighlightsBy:NSContentsCellMask];
[[myButton cell] setImage:myImage];
[[myButton cell] setAlternateImage:myAltImage];
Set the button to be borderless and non-transparent, and it should
work without showing the darkening effect.
-Jeremy
Thanks for the reply. After further experimentation, it turns out the
alternate image is darker, which causes the effect. D'oh! Time to yell
at the graphics dude.
Thanks,
Glen
_______________________________________________
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.