Value is the correct thing to use to determine the state of the
radiobutton.
Besides being useful for setting the initial state, you'll find it's
TRUE for the selected button.
A slight amplification on the example program might help:
dim c as Control
for i as Integer = ControlCount - 1 DownTo 0
c = Control(i)
if c isa RadioButton and RadioButton(c).parent = GroupBox1 then
MsgBox c.Name + " " + RadioButton(c).Text + " " + str
(RadioButton(c).value)
end if
next i
Russ
On Jun 21, 2006, at 11:03 AM, Chuck Pelto wrote:
Hi Steve,
On Jun 21, 2006, at 4:45 AM, Steve Garman wrote:
What is the best way to collect or identify all the RadioButtons
in a
given GroupBox?
dim c as Control
for i as Integer = ControlCount - 1 DownTo 0
c = Control(i)
if c isa RadioButton and RadioButton(c).parent = GroupBox1 then
MsgBox c.Name
end if
next i
This looks useful. Thanks.
Next, as always, question.....
What's the call to tell whether a radio button is the selected item
within a such a group?
Value doesn't seem to do it. And I can't find any property inside
of RectControl or Control Classes that will do it either.
Regards,
Chuck
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>