comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CW_BGROUP and NONEXCLUSIVE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
CW_BGROUP and NONEXCLUSIVE [message #28145] Sat, 24 November 2001 06:24
Ralf Schaa is currently offline  Ralf Schaa
Messages: 37
Registered: June 2001
Member
Cheers!
I have this little problem with CW_BGROUP and the parameter /NONEXCLUSIVE:
as far as i know the buttons can have two values (on=1, and off=0) , so how
can i tell my program, that if when the status of the button is 'on' that he
does something (for testing: print, 'on' and otherwise print, 'off') ..see
the source below how i tried to solve it..seems logical to me, but it
doesn't work....

thanx for any help!
ralf


;======================
COMMON drawbutton, draw
draw = {onoffpanel: fltarr(4) }
draw.onoffpanel = [0,0,0,0] <---my predefined values

;============================================
; defined in the main-programm
;============================================
onoffpanel=CW_BGROUP(container1,['sat1','sat2','sat3','sat4' ],$
/NONEXCLUSIVE, $
FONT=font,/RETURN_INDEX,$
UVALUE='onoff',SET_VALUE=draw.onoffpanel, $
COLUMN=4,LABEL_TOP='sat-plot: ',/FRAME)

;======================================
; defined in the event_programm
;======================================

WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev

CASE Ev OF
'onoff': BEGIN
draw.onoffpanel= event.value
CASE draw.onoffpanel(0) OF
0: PRINT, 'sat1:off'
1: PRINT, 'sat1:on'
ENDCASE
CASE draw.onoffpanel(1) OF
0: PRINT, 'sat2:off'
1: PRINT, 'sat2:on'
ENDCASE
CASE draw.onoffpanel(2) OF
0: PRINT, 'sat3:off'
1: PRINT, 'sat3:on'
ENDCASE
CASE draw.onoffpanel(3) OF
0: PRINT, 'sat4:off'
1: PRINT, 'sat4:on'
ENDCASE
ENDCASE
ENDCASE
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: converting int array to a string
Next Topic: IDL on FreeBSD

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:47:33 PDT 2025

Total time taken to generate the page: 0.00580 seconds