Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.757 xmradiobox

xmradiobox(parent, callback, font, color, label1 [,...] [, columns])

[motif package] Creates a radio box widget with radio buttons and returns the IDs of the radio box widget and the radio buttons. Each radio button is displayed as a small diamond button with a label after it. The diamond button looks either depressed (selected), or not depressed (not selected). Only one of the radio buttons in the widget can be selected at any one time, and its diamond button is the only one that looks depressed.

The radio box widget is placed inside the indicated parent widget. The radio button labels are indicated by the string argument label1 and following arguments. If the last argument is a scalar, then it indicates the number of columns in which the radio buttons are to be placed. The font applies to the radio button labels, and the color to just the radio buttons. The callback is a string that gets executed when one of the radio buttons is selected. The index of the selected button (with counting starting at 0) can be found in global variable $RADIO_button and the state of the selected button (always 1) in $RADIO_state. These global variables are also used by other widgets.

The function returns an array of integers. The first number is the widget ID of the column/row widget that contains the radio buttons. The remaining numbers are the IDs of the individual radio buttons.