PML Customisation User Guide

Gadget Set : Frame Gadgets : Frame Radio Groups
An example of a FRAME with a directly defined radio group looks like this:
The radio group action only applies to FRAME gadgets of type NORMAL, PANEL, FOLDUPPANEL.
You can add RTOGGLE to a FRAME with the usual positioning and layout commands.
The FRAME has a value member, VAL, which is the index of currently selected RTOGGLE for the radio group. You can use this to change the selected RTOGGLE.
Similarly, you change the value of the FRAME by setting the VAL member of any of the group’s RTOGGLEs to true.
Note that the FRAME group value may be set to zero, indicating that there is no selected RTOGGLE. Similarly if the selected RTOGGLE value is set to false, then it becomes deselected and the FRAME value will then be zero.
The default value for an RTOGGLE gadget is FALSE, and the default value for a FRAME gadget is zero, i.e. no selected RTOGGLE.
The FRAME gadget can have an assigned callback, which is executed when the radio group selection is changed, i.e. whenever you select an unselected radio-toggle. As there is only a SELECT action supported, it can be either a simple callback or an open callback.
Note:
The form’s keyboard focus is initially placed on the OK button to prevent it being assigned (by Windows) to the first RTOGGLE rad1 (effectively the first interactive gadget on the form as the text field Selection is read-only)
The form constructor method assigns a simple callback, the form method RGroupSelectionChanged(), to the frame rg1 (radio group). It then initialises the gadget values and selects the second RTOGGLE as the default selection.
The group callback uses the FRAME’s VAL member to get the current selected index and hence the current RTOGGLE and its OnValue member value. If the selected RTOGGLE’S value is ‘radio’ then the selected program is read from the RADIO option gadget. Finally the selected program string is displayed in the Selection (read-only) text gadget.
The callback on the RADIO option gadget, detects if the ‘Radio:’ RTOGGLE rad5 is current and if so it deselects it leaving no current selection, and clears the Selection text field.

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo