|
|
Re: Free-hand ROIs using DRAW_WIDGET [message #26665 is a reply to message #26662] |
Wed, 19 September 2001 20:08  |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
Andre Kyme wrote:
>
> Hi,
>
> Cannot see how to use the event-generating options provided by
> WIDGET_DRAW in order to draw a free hand ROI.
> If I could interrupt motion events I can do it, but I can't stop motion
> events once they are going!
>
> Any help would be appreciated,
>
> Thanks,
> Andre
Andre,
Something like this should do the trick. This uses Mouse Button 3
to toggle the motion events on/off.
Pseudo English:
If a button is pressed DOWN and it's MB 3 Then
Check status of motion events
Toggle motion events to opposite setting
end
IF ev.type EQ 0 AND ev.press EQ 4 THEN BEGIN
IF Widget_Info(ev.id,/DRAW_MOTION_EVENTS) THEN BEGIN
Widget_control, ev.id,Draw_Motion_Events=0
ENDIF ELSE BEGIN
Widget_control, ev.id,Draw_Motion_Events=1
ENDELSE
ENDIF
Andrew
------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
|
|
|