Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello Everyone!


I create a simple Check box for Sex(Male& Female)in C# Windows Forms Application. but Now i want that user can only select one Check Box.Please Help Me If Anyone Know About this.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Sep-14 22:15pm    
Not clear.
—SA

1 solution

They have created radio buttons for this very purpose: Radio Button Class[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 7-Sep-14 22:17pm    
OP's question is very unclear, but this is the only possible sense I can see.
Besides, radio buttons would help to avoid sexism. Indeed, considering female as checked and mail unchecked (or visa versa), as some do, would not look correct. :-)
My 5.
—SA
CPallini 8-Sep-14 1:23am    
Thank you. I suppose the OP wants to use the checkboxes like radio buttons. Of course , programmatically you could do that, but it is not advisable.
Sergey Alexandrovich Kryukov 8-Sep-14 9:56am    
After your answer and explanation I agree this was likely the case. Singular form of "check box" OP used makes it unclear. As if check box checked means one sex (sex is present :-) and unchecked another one. Believe or not, I saw such variant... :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900