You are here: Creating a RadioButtonGroup Using a Constructor: kony.ui.RadioButtonGroup
A RadioButtonGroup widget allows you to make one selection when you have many choices. When you make a selection, a dot appears in the radio button to indicate your selection.
All the properties of the CheckBoxGroup widget apply to RadioButtonGroup widget. However, you can make only one option in case of radio buttons while you can select multiple options in checkboxes.
Following are the real-time use cases of RadioButtonGroup widget:
Examinations: Radio buttons are used in tests that consist of multiple-choice questions. Students choose one of the available options as their answer.
Remember password: You can use a RadioButton widget for a binary yes or no choice. For instance, consider a login page, you are given a choice to select the remember me? option. You can select the RadioButton widgetif you want the browser to remember your password.
Terms of service agreement: The terms of service agreement while installing an application, employs a RadioButton widget. The user must select the terms of agreement to proceed with installing the application.
Modify UI: Modify the UI based on the selection of an option from the list. For instance, while configuring an identity service, the type of provider details and the UI is changed is based on the type of identity selected.
Creating profile: You can use radio buttons for selecting gender while creating your profile in an application.
Coupons: coupons in food and shopping applications use radio buttons as well.
Widgets are normally added to your application using Quantum Visualizer, but can also be added from code. For general information on using widgets in Quantum Visualizer, see Designing an Application in the Visualizer User Guide.
For general information on the RadioButtonGroup widget see the RadioButtonGroup topic in the Quantum Visualizer User Guide.
The RadioButtonGroup widget capabilities can be broadly categorized into the following:
The following are the important considerations for the RadioButtonGroup widget.
RadioButtonGroup widget is always a group widget.
Limit the number of choices in the widget. If you need to display several choices, consider using a ComboBox widget.
When the viewType is set as RADIOGROUP_VIEW_TYPE_ONSCREENWHEEL, the skin supports only backgroundcolor and style as one color.
Multistep Gradient is not supported when groupCells property is set to true.
If you set the itemOrientation to horizontal, do not place more than two items in the group, as there is a platform limitation. If you place more than two items and the associated text with the items is large, there is a possibility that the additional items will not fit in the screen width and will not be visible on the screen.
The focusSkin property, background color is not be applied to the selected item, only font color is be applied. For example, if you define a skin for focusSkin property as background as red and font color as yellow, then only the font color is applied ignoring the background color.