Re: NSButton darkens background when pressed
Re: NSButton darkens background when pressed
- Subject: Re: NSButton darkens background when pressed
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 3 Mar 2004 14:23:52 +0000
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
========================================
email@hidden
theLocustFarm.net:
- fractious fiction at
http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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.