Re: NSButton/NSBox interaction
Re: NSButton/NSBox interaction
- Subject: Re: NSButton/NSBox interaction
- From: Keary Suska <email@hidden>
- Date: Thu, 10 Apr 2014 07:57:07 -0600
On Apr 9, 2014, at 5:30 PM, Graham Cox wrote:
>
> On 10 Apr 2014, at 7:06 am, Tom Doan <email@hidden> wrote:
>
>> have a dialog which has an NSBox. Inside the NSBox are two
>> (separate, but conceptually linked) sets of radio buttons. These are
>> just NSButtons with radio style---I haven't (at least intentionally)
>> embedded them into an NSMatrix. However, when I select one of
>> the buttons from one set, it resets all others in both sets to off so
>> somehow it's automatically interpreting <<all>> the buttons inside
>> the box as a single collection even though that's not my intention.
>> However, I can't see anything in the description of either NSButton
>> or NSBox that seems to cover this behavior so I can override it. Can
>> someone explain what's happening, please?
>
>
> I'm not exactly certain of the mechanism, but I think radio buttons interact as a set through the agency of their immediate superview, so if several buttons share it, they are assumed to be part of the same set.
>
> So you can embed the separate sets into container views or NSMatrix, and they'll work as you want. You mention NOT putting them into a NSMatrix for some reason - what reason? That's the usual way to set up radios, though it comes with the added restriction that the buttons have to be laid out on a regular grid. But embedding them in a custom view that draws nothing should also work, and that has no such limitation.
That would be great functionality that I have often desired but AFAICT that is not the case--at least I am unable to replicate it. Or do you mean multiple radio-type NSButtonCells in a single view? That would make sense but only NSMatrix has that functionality built-in, AFAIK.
I suspect this is really a code or binding issue.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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