Re: NSButtonCell Ignores Button Type -- A Discovery and Annoyance
Re: NSButtonCell Ignores Button Type -- A Discovery and Annoyance
- Subject: Re: NSButtonCell Ignores Button Type -- A Discovery and Annoyance
- From: Ricky Sharp <email@hidden>
- Date: Tue, 29 Mar 2005 20:53:13 -0600
On Mar 29, 2005, at 6:40 PM, Seth Willits wrote:
When I use my custom cell, I get the toggling behavior like I said
above. However if I use a normal NSButtonCell (no custom drawing), it
draws and behaves as a normal push button. I add on with a category to
NSButtonCell and put a break point in the setState method, and have
found out that the NSButtonCell code simply ignores what the state is
when drawing, and only uses [self isHighlighted]. Now, I would do this
if I could, except that I elsewhere, I *do* want my cells to use a
toggling behavior. I *thought* NSMatrix took care of this with the
different matrix modes, but it's obvious now that it does not.
One thing you may want to try is not subclassing NSButtonCell, but
NSActionCell instead. I swear there's many things under the hood going
on when an NSMatrix holds NSButtonCell cells.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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