Option buttons, sometimes referred to as "radio buttons", allow the user to select a value from a limited range. Option buttons are useful when a limited number (2, 3, or 4) of allowed values exist.
You can create an option buttons control:
•In the Definer, by using the Option Buttons display type for a domain. •In the Windows Designer, by inserting an option buttons control class into a window or dialog. If you create the control using the Option Buttons display type, allowed values must be defined at domain level. In this case, the option buttons appear automatically after synchronization.
If you create the control in the Windows Designer, the values on the list can either be hard-coded, or retrieved from the database by means of a SQL statement or Related Column.
To insert an option buttons control using the Windows Designer:
1. | Use the Windows Designer catalog to open the appropriate window/dialog. |
2. | In the design view, select the object into which you want to insert the option buttons. |
3. | From the menu bar, choose Insert, Option Buttons, or drag one of your own option buttons control classes from the Controls tab page of the Windows Designer catalog. |
4. | Make sure the Selection Filter option from the View menu is turned on, select the option buttons control, and then open the Property Inspector. |
5. | On the General tab page, set the Display Type property to: Option Buttons. |
| Now the text box is turned into an option buttons control. |
6. | Depending on whether you want to hard code the values on the option buttons or retrieve them from the database, set the Value List property, or the Values to Query property. You can also use a Related Column. |
| If you use the Value List property, separate the values by means of "returns" (either use SHIFT+ENTER, or CTRL+ENTER). If the actual values are not the same as the prompts you want to use, set the Value List Prompts property (again use returns to separate the values). |
7. | Optionally, change the Prompt property (for the Option Buttons group) and the Default Value property to suit your needs. |
| For example, set the Prompt to: Gender, and the Value List to: |
Male
Female
Unknown
|