Version 6.3.8 für Windows
 —  Leitfaden zur Programmierung  —

Working with a Group of Radio Button Controls

Radio button controls are created just like push button controls or toggle button controls; however, they are grouped using the GROUP-ID attribute. If you define a number of radio button controls as a group, only one button is selected at any time. The GROUP-ID attribute provides this selection logic.

You group several radio button controls by assigning them the same GROUP-ID value (group number) in their attributes windows. If the end user clicks on a radio button control, all other radio-button controls in the dialog with the same GROUP-ID will be deselected. They will also be deselected if one radio button control is selected by code like the following:

... 
   1 #RB-1 HANDLE OF RADIOBUTTON 
... 
#RB-1.CHECKED := CHECKED  /* Set the CHECKED attribute to value CHECKED 
...

You also have to bear in mind that the end user should be able to use the keyboard for navigation inside a group of radio button controls: TAB selects the first radio button control, and the arrow keys enable you to navigate within the radio button group. To ensure that Natural automatically allows for such navigation, the radio button controls must follow each other directly in the navigation sequence. If you are dynamically adding a radio button control via the PROCESS GUI statement action ADD, this can be achieved by specifying a value for the button's FOLLOWS attribute.

Beginn der Anweisungsliste To edit the navigation sequence

Seitenanfang