Pmw.RadioSelect radio buttons

GUI element for a variable with distinct values

radio2 = Pmw.RadioSelect(frame_right,
       selectmode='single',
       buttontype='radiobutton',
       labelpos='w',
       label_text='Pmw radio buttons\nsingle selection',
       orient='horizontal',
       frame_relief='ridge', # try some decoration...
       command=status_radio2)

for text in ('item1', 'item2', 'item3', 'item4'):
    radio2.add(text)
 radio2.invoke('item2')  # 'item2' is pressed by default

def status_radio2(value):
    ...

previousnexttable of contents