Forum Discussion

RobertDAltman's avatar
RobertDAltman
Occasional Contributor
7 years ago

How to access UserForm radio button Caption

I have a UserForm that I display from JavaScript   var userForm = UserForms.StartupForm; var formResult = userForm.ShowModal(); The UserForm contains a RadioGroup with several radio buttons on it....
  • RobertDAltman's avatar
    7 years ago

    Many thanks to Evgeny in tech support for this solution:

     

    // In this example, a form named MyForm contains a radio button group
    // named radioGroup.

    // Display a modal form var frm = UserForms.MyForm; var modalResult = frm.ShowModal(); // Get the selected radio button var idx = frm.radioGroup.ItemIndex; var rb = frm.radioGroup.ChildControl(idx); // Access properties on the radio button control var selectedCaption = rb.Caption;

    Note that code completion doesn't display any properties or methods for the radio button object.