you could write a genic method for this such as below (not tested)
public RadioButton GetSelected(Control owner)
{
foreach(Control control in owner.Controls)
{
if(control is RadioButton)
{
RadioButton candidate = (RadioButton)candidate;
if(candidate.Checked)
return candidate;
}
}
return null;
}
[quoted text, click to view] "Nadia" <Nadia@discussions.microsoft.com> wrote in message
news:373E1AD8-4CFE-454F-92C9-F5E0C475E007@microsoft.com...
> well if you don't interrogate each one, then how can you find out which
> one
> is checked?
>
> Code Example please.
>
> "Darren Shaffer" wrote:
>
>> there is no group box control in the .Net Compact Framework, however
>> if you place multiple radio buttons on a form or panel, their boolean
>> state
>> behaves as a group but you do need to interrogate each one to determine
>> which (if any) is checked.
>>
>> -Darren
>>
>> "Nadia" <Nadia@discussions.microsoft.com> wrote in message
>> news:50125311-EF8A-44E6-8D17-146A515DA4E2@microsoft.com...
>> > if you put three Radio Buttons in a group box. Is there a way to use
>> > the
>> > group box control to check an see which radio button is selected.
>> > Instead
>> > of
>> > having to check each radio button to see if it is selected?
>> >
>> > C# Please.
>> >
>> > Thanks
>>
>>
>>