On Mar 21, 2007, at 4:43 PM, Jim Wagner wrote:

> You could have each RadioButton action event write its index to a
> variable in the parent (window?) class. Then, it would be easy to
> access from outside which one was true.
>
> Jim Wagner

No need
That makes your buttons depend on the presence of some other variable  
outside them just to test which one is set

The style joe posted works just fine, it just looks odd because you  
usually have each CASE listing some "value" to test for like

  dim i as integer

  select case i
   case is 1
     ...
   case is 2
     ...
   end select

It just seems weird to have the initial test be "select case true"  
since you usually use a variable in the "select case" and then look  
for specific values.
In this instance we are trying to figure out which radio button is  
set to true AND because it's a control array only one of them will be.
Select case tries each radiobutton for us instead of having to write  
a long "if then elseif" statement

  select case True
   case is radiobutton(0).Value
     ...
   case is radiobutton(1).Value
     ...
   end select


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to