PRO Checkmarks_Event, event ; Get the current button selection. Widget_Control, event.top, Get_UValue=currentSelection ; Unselect the old current button, and select the new ; current button. Widget_Control, currentSelection, Set_Button=0 Widget_Control, event.id, Set_Button=1 ; Update and store the current selection. currentSelection = event.id Widget_Control, event.top, Set_UValue=currentSelection END ;----------------------------------------------------- PRO Checkmarks ; Create the widgets. Set the CHECKED_MENU keyword on buttons ; that will allow checkmarks. tlb = Widget_Base( title = 'Checkmark Test Program', XOffset=50, YOffset=50) menuButton = Widget_Button(tlb, /Menu, Value='Pull-Down Menu', Scr_XSize=150) catID = Widget_Button(menuButton, Value='Cat', /Checked_Menu) dogID = Widget_Button(menuButton, Value='Dog', /Checked_Menu) coyoteID = Widget_Button(menuButton, Value='Coyote', /Checked_Menu) frogID = Widget_Button(menuButton, Value='Frog', /Checked_Menu) ; Save the current button so it can be stored internally in UVALUE. current = coyoteID ; Put a checkmark on the current button. Widget_Control, current, Set_Button=1 ; Realize and run the program. Widget_Control, tlb, /Realize Widget_Control, tlb, Set_UValue=current XManager, 'Checkmarks', tlb, /No_Block END