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

Home » Public Forums » archive » Re: Linking buttons to plot windows
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: Linking buttons to plot windows [message #42060 is a reply to message #42056] Mon, 20 December 2004 11:50 Go to previous messageGo to previous message
Clive  Cook is currently offline  Clive Cook
Messages: 5
Registered: December 2004
Junior Member
Thanks David, i'm pretty new to widget programming so i am not really sure
what to do. This is an example of the code that the GUIbuilder generates. I
assume that the first part of the code (WID_BASE_0_event) handles the
events, so when i press wid_button_1 the function contour1 is called. As i
mentioned before this plots in the last area designated for plots
(wid_draw_1). How can i specifically plot it in the first area (wid_draw_0)?

many thanks

Clive Cook

;
; IDL Widget Interface Procedures. This Code is automatically
; generated and should not be modified.

;
; Generated on: 12/20/2004 14:15.45
;
pro WID_BASE_0_event, Event

wWidget = Event.top

case Event.id of

Widget_Info(wWidget, FIND_BY_UNAME='wid_button_0'): begin
if( Tag_Names(Event, /STRUCTURE_NAME) eq 'WIDGET_BUTTON' )then $
contour1, Event
end
Widget_Info(wWidget, FIND_BY_UNAME='WID_BUTTON_1'): begin
if( Tag_Names(Event, /STRUCTURE_NAME) eq 'WIDGET_BUTTON' )then $
contour2, Event
end
else:
endcase

end

pro WID_BASE_0, GROUP_LEADER=wGroup, _EXTRA=_VWBExtra_

Resolve_Routine, 'phoenix_eventcb',/COMPILE_FULL_FILE ; Load event
callback routines

WID_BASE_0 = Widget_Base( GROUP_LEADER=wGroup, UNAME='WID_BASE_0' $
,XOFFSET=5 ,YOFFSET=5 ,SCR_XSIZE=800 ,SCR_YSIZE=600 $
,TITLE='Phoenis Software V1.0' ,SPACE=3 ,XPAD=3 ,YPAD=3)


WID_DRAW_0 = Widget_Draw(WID_BASE_0, UNAME='WID_DRAW_0' ,XOFFSET=39 $
,YOFFSET=70 ,SCR_XSIZE=691 ,SCR_YSIZE=192)

WID_TEXT_0 = Widget_Text(WID_BASE_0, UNAME='WID_TEXT_0' ,XOFFSET=39 $
,YOFFSET=21 ,SCR_XSIZE=101 ,SCR_YSIZE=18 ,/ALL_EVENTS ,VALUE=[ $
'Channel 1 - 532 nm', '' ] ,XSIZE=20 ,YSIZE=1)


WID_BUTTON_0 = Widget_Button(WID_BASE_0, UNAME='wid_button_0' $
,XOFFSET=175 ,YOFFSET=20 ,SCR_XSIZE=111 ,SCR_YSIZE=20 $
,/ALIGN_CENTER ,VALUE='Plot Channel 1')


WID_DRAW_1 = Widget_Draw(WID_BASE_0, UNAME='WID_DRAW_1' ,XOFFSET=39 $
,YOFFSET=333 ,SCR_XSIZE=697 ,SCR_YSIZE=189)

WID_BUTTON_1 = Widget_Button(WID_BASE_0, UNAME='WID_BUTTON_1' $
,XOFFSET=182 ,YOFFSET=306 ,SCR_XSIZE=111 ,SCR_YSIZE=18 $
,/ALIGN_CENTER ,VALUE='Plot Channel 2')

Widget_Control, /REALIZE, WID_BASE_0

XManager, 'WID_BASE_0', WID_BASE_0, /NO_BLOCK

end
;
; Empty stub procedure used for autoloading.
;
pro phoenix, GROUP_LEADER=wGroup, _EXTRA=_VWBExtra_
WID_BASE_0, GROUP_LEADER=wGroup, _EXTRA=_VWBExtra_
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Widgets for dummies?
Next Topic: Linking buttons to plot windows

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

Current Time: Wed Dec 03 10:45:45 PST 2025

Total time taken to generate the page: 0.16111 seconds