Re: Irregular layout of radio buttons
Re: Irregular layout of radio buttons
- Subject: Re: Irregular layout of radio buttons
- From: vincent habchi <email@hidden>
- Date: Tue, 9 Nov 2010 07:00:58 +0100
Le 8 nov. 2010 à 22:22, Lee Ann Rucker a écrit :
> It is annoying that you can't do it; Java let you make a group of radio buttons without affecting their layout.
Well… I've banned Java from my world a long time ago! :)
> We have several places where we need this, so I created a custom NSView subclass that found all its radio buttons and added observers on "state" with option NSKeyValueObservingOptionNew. When a button's state changed to NSOnState, it set all the other buttons to NSOffState.
Nice trick! That's much more clever than programming the controller to do it "manually". Thanks for the hint!
Vincent
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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:
This email sent to email@hidden