idlusers-news-gateway:
id AA15967; Wed, 14 Dec 94 14:41:12 +0100
(5.67b/IDA-1.5 for idlusers@maz.sma.ch); Wed, 14 Dec 1994 14:39:15 +0100
Cc: venvd@nlr.nl
Hello Chris!
I will give two answers:
1. I have no problems using CURSOR in a big widget-application
with WIDGET_DRAWs. I didn't read the manual before writing
my applications and I find only, that positioning of the
cursor seems a little bit randomly, say values in a image_
cont - plot, where little squares have to show up one
value. Positioning of the cursor inside of the squares
return sometimes the value of the neighboured box.
2. Try this (as Stephen mentioned):
631 PRO MAIN13_Event, Event
...
634 COMMON INTERNA,xstart,ystart,xend,yend
635
636 WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev
637
638 CASE Ev OF
639
...
658 'DRAW27': BEGIN
659 ; Some tests of mouse buttons
660 ; You can't check ... IF (event.press eq 1B) ... I don't know why!!
661 help,event,/struc
662 IF (event.press ne 0B) THEN BEGIN
663 xstart=event.x
664 ystart=event.y
665 ENDIF
666 IF (event.press eq 0B) THEN BEGIN
667 xend=event.x
668 yend=event.y
669 ENDIF
670 IF (event.release eq 1) THEN xyouts,xstart,ystart,'B',color=60,/device
671 IF (event.release eq 2) THEN plots,[xstart,xend],[ystart,yend], $
672 color=240,/device
673 IF (event.release eq 4) THEN xyouts,xend,yend,'E',color=120,/device
674 print,event.x,' ',event.y
675 no_draw_event: Print, 'Event for Drawing Area'
676 END
...
692 ENDCASE
693 END
694
824 PRO progname, GROUP=Group
...
834 MAIN13 = WIDGET_BASE(GROUP_LEADER=Group, $
835 COLUMN=1, $
836 MAP=1, $
837 TITLE='Evaluation Kit V 1.0 Copyright by EURAD', $
838 UVALUE='MAIN13', $
839 XOFFSET=20, $
840 YOFFSET=20)
...
984 DRAW27 = WIDGET_DRAW( BASE25, $
985 BUTTON_EVENTS=1, $
986 MOTION_EVENTS=1, $
987 RETAIN=2, $
988 UVALUE='DRAW27', $
989 XSIZE=600, $
990 YSIZE=400)
...
1165
1166 WIDGET_CONTROL, MAIN13, /REALIZE
1167
1168 ; Get drawable window index
1169
1170 COMMON DRAW27_Comm, DRAW27_Id
1171 WIDGET_CONTROL, DRAW27, GET_VALUE=DRAW27_Id
....
1893 XMANAGER, 'MAIN13', MAIN13
1894 END
This is an extraction from one of our widget_applications. It shall show
how to use the mouse-buttons via eventhandler. It's my first test and build
mainly by the new widget_builder of IDL 3.6.1
Hope that my explanation helps
Andreas O.
***
A question of me: Does anyone use the widget_builder of 3.6.1 under 3.5.1
on a PC. The author of the builder mentionend somewhere in the code, that
it's possible. But my IDL-Compiler is looking for wided.com file. What does
this mean? I can't find such a file on the 3.6.1 PC-Version.
***
EURAD-Administration
Postanschrift: Universitaet zu Koeln (GERMANY)
Institut fuer Geophysik und Meteorologie
- Projekt EURAD -
Atmosphaerische Umweltforschung
Dr.Andreas Oberreuter, Aachener Strasse 201-209, 50931 Koeln
Telefon: 0221 - 400 22 20 / 400 22 58 (Sekretariat)
Fax: 0221 - 400 23 20
E-Mail: ao@eurad.uni-koeln.de
|