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

Home » Public Forums » archive » Trouble with CW_BGROUP events
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Trouble with CW_BGROUP events [message #49088 is a reply to message #48992] Mon, 12 June 2006 03:53 Go to previous message
A. D. & J.C. Cool is currently offline  A. D. & J.C. Cool
Messages: 16
Registered: February 2000
Junior Member
Phillip Bitzer wrote:
> Hello all
> New to IDL, kind of learning as I go. I am having trouble with a widget
> interface, in which I want a set of radio buttons (created by
> cw_bgroup) to control (among other things) the sensitivity of some
> sliders. The buttons and sliders are located on a tab interface, but
> are on the same tab. Whenever I trigger a event with the
> "satview_GUI_changeAngle" code, it runs through fine once, but then
> tries again to go through the code, (seemingly) without a second event.
> I tried to /no_release keyword, but to no avail. Any ideas?
>
> Thanks in advance for any help.
>
>
> WIDGET CREATION CODE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ...
> tabAngID = WIDGET_BASE(tabID, Event_Pro='satview_GUI_changeAngle')
> ;create the sliders for the angles of the CCD's
> angle3ID=CW_FSlider(tabAngID,uvalue='angle3',uname='angle3')
> angle4ID=CW_FSlider(tabAngID,uvalue='angle4',uname='angle4')
> ;create the radio buttons for the number of CCD's
> numCCDID = CW_BGROUP(tabAngID,['1','2
> (Default)'],button_uValue=[1,2],/exclusive,set_value=1,uvalu e='numofCCDs',/no_release)
>
> EVENT HANDLER CODE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> pro satview_GUI_changeAngle,event
>
> widget_control,event.id, get_value=buttonvalue,get_uvalue=userValue
> CASE userValue OF
> ...
> 'numofCCDs' : BEGIN
> angle3ID = widget_info(Event.top, find_by_uname='angle3')
> angle4ID = widget_info(Event.top, find_by_uname='angle4')
> CASE buttonvalue OF
> '1' : widget_Control,angle3ID,SENSITIVE=0 &
> widget_Control,angle4ID,SENSITIVE=0
> END
> '2' :widget_Control,angle3ID,SENSITIVE=1 &
> widget_Control,angle4ID,SENSITIVE=1
> END
> ELSE:RETURN
> ENDCASE
> RETURN
> END
> ELSE : RETURN;do nothing
> ENDCASE
>
> end

Phillip,

I've rearranged your code a little, and it works OK for me under IDL
6.3.

Andrew

pro satview_GUI_changeAngle_event,event

widget_control,event.id,
get_value=buttonvalue,get_uvalue=userValue

print,'uservalue = ',uservalue
print,'buttonvalue = ',buttonvalue

CASE userValue OF

'numofCCDs' : $
BEGIN
angle3ID = widget_info(Event.top,
find_by_uname='angle3')
angle4ID = widget_info(Event.top,
find_by_uname='angle4')

CASE buttonvalue OF
'0' : $
Begin
widget_Control,angle3ID,SENSITIVE=0
widget_Control,angle4ID,SENSITIVE=0
END

'1' : $
Begin
widget_Control,angle3ID,SENSITIVE=1
widget_Control,angle4ID,SENSITIVE=1
END
ELSE:RETURN
ENDCASE

RETURN
END ; of numofCCDs

ELSE :
ENDCASE

end

pro satview_GUI_changeAngle

tabAngID = WIDGET_BASE(/Col, Event_Pro='satview_GUI_changeAngle')
;create the sliders for the angles of the CCD's

angle3ID=CW_FSlider(tabAngID,uvalue='angle3',uname='angle3')

angle4ID=CW_FSlider(tabAngID,uvalue='angle4',uname='angle4')
;create the radio buttons for the number of CCD's
numCCDID = CW_BGROUP(tabAngID,['1','2(Default)'],$

button_uValue=[1,2],/exclusive,set_value=1,$

uvalue='numofCCDs',/no_release,/frame)


widget_control,tabAngid,/real

xmanager, 'satview_GUI_changeAngle',tabAngID

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: is there a function or command in IDL like the "bitget" in matlab?
Next Topic: Re: is there a function or command in IDL like the "bitget" in matlab?

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

Current Time: Sat Oct 11 04:23:47 PDT 2025

Total time taken to generate the page: 0.80135 seconds