group radio buttons in seperate custom controls

  • Thread starter Thread starter Peted
  • Start date Start date
P

Peted

Hi
using VS 2008 C# winforms

I was hoping someone might have an idea on how to do this

I have a custom user control in my winforms projrct.
Each control has a textbox and a single radio button.

I can add the control to a winforms ok.

What i want to do is add multiple instances of this control to a
winforms which i can do but...

i want the radio buttons in each of the customs controls added to act
as if they were all in one group and be mutually exclusive when
selected. So if i dd 5 instances of the custom control i have 5 radio
buttons.
But of course being in a custom control they dont function that way
and i was wondering if anyone had any idea of how to achieve this

thans for any help


Peted
 
I was hoping someone might have an idea on how to do this

I have a custom user control in my winforms projrct.
Each control has a textbox and a single radio button.

I can add the control to a winforms ok.

What i want to do is add multiple instances of this control to a
winforms which i can do but...

i want the radio buttons in each of the customs controls added to act
as if they were all in one group and be mutually exclusive when
selected. So if i dd 5 instances of the custom control i have 5 radio
buttons.
But of course being in a custom control they dont function that way
and i was wondering if anyone had any idea of how to achieve this

You have virtually no choice other than raising an event from the custom
control when a radio button is checked and then broadcasting that to the
other controls. So one control will raise the event and the parent form will
need to call a method (which you'll provide) in the other custom controls
(in that group) telling them to uncheck their radio buttons.
 
Back
Top