Pro SpinIt_Event, event ; Get the quit button identifier from user value of the TLB. Widget_Control, event.top, Get_UValue=quitter CASE event.id OF quitter: Widget_Control, event.top, /Destroy ELSE: ok = Widget_Message('Spinner Event In Wrong Event Handler--Whoops!') ENDCASE END ; ****************************************************************** Pro SpinIt ; Simple program to test the user program CW_SPIN ; Create a top-level base. Stack children in a single column. tlb = Widget_Base(Column=1, Title='SpinIt') ; Create a QUIT button and the SPINNER compound widget. spinner = CW_Spin(tlb, Value=25, Increment=5, UValue='SPIN') quitter = Widget_Button(tlb, Value='Quit', UValue='QUIT') ; Realize the widget program. Save quit button identifier. Widget_Control, tlb, /Realize, Set_UValue=quitter ; Register the program and set up the event loop. XManager, 'SpinIt', tlb, Event_Handler='SpinIt_Event' END ; ******************************************************************