However, I have to say this, that REALbasic seems to have some 'issues' with that hobgoblin of all applications, consistency. Without the help of the fine people in this ListServ, I'd be floundering because in one place you do one thing, in another place you do something different and it seems that one has to be a member of the upper-echelons of the priesthood in order to fully grasp it all.


Steve's code answers your first question. Your second question requires the addition of two lines to Steve's code, so the result is:

  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
      If RadioButton(c).Value then
        MsgBox c.Name
      End
    end if
  next i

But, just curious, why does this raise an issue of 'consistency' with Rb? Using Control() to loop through a window's controls to identify the class of an instance, then querying its attributes, is fundamental and well documented.

Best regards,

Jack
_______________________________________________
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>

Reply via email to