Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An NSCell with Radio Buttons. Easy?



Well, after I worked around the 'enable' binding bug in NSTableColumn, I am Panther-bugged again.

If appears that that if you put a 3-segment NSSegmentedCell in an NSTableColumn, when run in Panther, the second and third segments get flipped and drawn into the first column. Incredible, but again, easily reproducible using mmalc's ToDos example project.

Instead of trying to fix it or prove it this time, since I don't really like the look of an NSSegmentedCell in an NSTableColumn anyhow (just used it to save development time), and since it also appears that -setBordered:NO and -setImage: "just don't work" on an NSSegmentedCell in either Panther or Tiger so I'm stuck with the big ugly bar, I was wondering if anyone could suggest another way to get a row of, say, 3 radio buttons in each row of an NSTableColumn. Like this (viewed in monospaced font):

                 My rating
             Good  Medium   Bad
Document 1   ( )    (*)     ( )
Document X   (*)    ( )     ( )
Document Y   (*)    ( )     ( )

So I can easily bind this to the 'rating' in my model, those "Good" "Medium" and "Bad" (mutex) buttons are all in the same column, one cell. Same function as an NSSegmentedCell, but not so ugly.

I believe the standard answer is to "write your own custom subclass of NSCell", but I fear that would involve all kinds of mouse tracking and stuff that would take a bonehead like me several days to get going. Is there any easy way to do this?

Thanks,

Jerry Krinock
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.