cancel
Showing results for 
Search instead for 
Did you mean: 

How to add radio buttons to a UserForm?

SOLVED
Highlighted
Occasional Contributor

How to add radio buttons to a UserForm?

Can someone please post an example that shows how to add a radio button to a UserForm?

 

I have a UserForm that contains a TcxRadioGroup whose Name property is radioGroup.  If I want to add a radio button to that radio group, I assume I need something like this:

 

var userForm = UserForms.MyForm;
userForm.RadioGroup.Properties.Items.Add( something );

but I can find no documentation or examples of the mysterious "something" in the above example.  The only relevant documentation (such as it is) is here.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: How to add radio buttons to a UserForm?

The Items.Add() method returns the new radio button, so:

 

var frm = UserForms.MyForm;
var rb = frm.radioGroup.Properties.Items.Add();
rb.Caption = "My caption";

Note that code completion does not display most of the available properties and methods.  For reference, the manual page for the TcxRadioGroupItem object is here.

View solution in original post

2 REPLIES 2
Highlighted

Re: How to add radio buttons to a UserForm?

Hi, 

 

As far as I can tell, the items can be added only at the design time (see the attached screenshot). They cannot be added during the run-time. 

Regards,
Yuriy Peshekhonov
Customer Care Engineer
Highlighted
Occasional Contributor

Re: How to add radio buttons to a UserForm?

The Items.Add() method returns the new radio button, so:

 

var frm = UserForms.MyForm;
var rb = frm.radioGroup.Properties.Items.Add();
rb.Caption = "My caption";

Note that code completion does not display most of the available properties and methods.  For reference, the manual page for the TcxRadioGroupItem object is here.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors