1.

Solve : c# if radio button select then?

Answer»

I have a radio button that is selected with

Code: [Select]InitializeComponent();
DOCUMENTS.Select();

I would put more code under it, but im stuck with trying to figure how to do an if(docuMents is selected){}. Can anyone help? I don't know much about C# but I would think a radio button would have a checked PROPERTY.

Code: [Select]if radiobutton.checked then ...

What software are you using for your program development?


Im using sharpdevelop.....radiobutton.select does select it like I want it too, i SUPPOSE i can try using checked but either way I DONT have a problem selecting it, just a problem writing an if/then statement for it.I'm thinking select is a method, checked is a property. Use the checked property (true/false) to determine the status of the radio button.

Not sure of the syntax but something like:

if radiobutton.checked = true then do something
if radiobutton.checked = false then do somethingelse

Does SharpDevelop have intellisense or auto-completion? That might prove HELPFUL on listing the properties and methods for a radiobutton.



cool thanks.....this worked

Code: [Select]docuMents.Select();

if (docuMents.Checked = true){



Discussion

No Comment Found