Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

If I place RadioButtons on my userControl (RadioButtonPanel) directly only one rb can be selected at a time without me having to implement anything - that's fine.

However the radiobuttons I have to use are not controls derived from RadioButton but are userControls (myRadioButton) themselves containing a radiobutton.

 

To get the original radioButton functionality working with myRadioButton controls I would do this:

 

myRadioButton would catch the click event of the contained radioButton and fire a similar event itself. The RadioButtonPanel containing several myRadioButton controls would register their clickEvents and unselect all radioButtons but the one calling the event.

 

Now I'd like to know if there's a better way to implement this functionality.

Since MyRadioButton is a UserControl I'm using it in the designer thus registering the events manually is not very nice. I'd like them to have the same behaviour as the RadioButton controls.

Debug me...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...