|
-
October 17th, 2011, 01:41 PM
#12
Re: Simpler suggestion?
Chiming in late here, but after coming from MFC, I'm always thought the radio button handling in .net to be lacking.
In MFC, for a group of radio buttons, you set the group style on the first radio button and then create an DDX int variable on the first button. The MFC framework with then return the selected 0-based index for radios in the group.
I always thought it was too bad that C# didn't provide this functionality.
I've never like the idea of having to enumerate the controls to detect whether a radio button was selected - I feel this is a framework function and I don't want to be bothered with it.
Check out the following thread. I've abstracted this functionality and provided some sample code. Please check out my response in.
http://www.codeguru.com/forum/showthread.php?t=493518
Also, TheGreatCthulhu made some great suggestions in this post as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|