Application Developer Guide > Using Wave Widgets > Creating a Radio Box
  

Creating a Radio Box
A radio box contains a set of buttons, usually used to set or display the state of a variable, process, or action. Radio box buttons can be either exclusive or nonexclusive. If the buttons are exclusive, only one can be selected at a time (like the buttons on a car radio). If the buttons are set to nonexclusive, any number of them can be selected at once. When a button is selected, its appearance changes to reflect this. Radio box buttons can also be labeled.
Example
A radio box is created with the WwRadioBox function. In this example, the keyword Nofmany specifies that the buttons are to be nonexclusive. The Border keyword specifies the thickness, in pixels, of the border around the buttons. The Spacing keyword specifies the space, in pixels, between buttons. RadioCB is the name of a callback routine that is executed when a button is selected. The result is shown in Radio Box.
top=WwInit('ww_ex8', 'Examples', layout)
; Create three labels for the radio buttons.
labels=['System', 'Owner', 'Group']
; Create the radio button box. 
rbox=WwRadioBox(layout, labels, 'RadioCB', $
/Vertical, Border=2, Spacing=20, /Nofmany)
status=WwSetValue(top, /Display)
WwLoop
 
Figure 5-17: Radio Box

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.