Computer Hope
Software => Computer programming => Topic started by: zaryk on April 05, 2008, 07:43:05 PM
-
I have a radio button that is selected with
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.
if radiobutton.checked then ...
What software are you using for your program development?
8)
-
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.
8)
-
cool thanks.....this worked
docuMents.Select();
if (docuMents.Checked = true){