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

Home » Public Forums » archive » Re: WIDGET_DRAW and TRACKING_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: WIDGET_DRAW and TRACKING_EVENTS [message #9479] Wed, 02 July 1997 00:00
Phil Williams is currently offline  Phil Williams
Messages: 78
Registered: April 1996
Member
Laurent Cambresy wrote:
>
> Hi,
>
> I don't understand how to use the keyword TRACKING_EVENTS. I need
> an event when the pointer enters in a window define by a WIDGET_DRAW.
> I use BUTTON_EVENTS and MOTION_EVENTS without any problem. The same
> syntax for TRACKING_EVENTS doesn't work.
> I'm looking for an example for this keyword...
>
> Thanks in advance,
>
> Laurent Cambresy

The way I do this is the following:

pro testEvent, event

type = tag_names(event, /structure)
if type eq 'WIDGET_TRACKING' then begin

;process the tracking event
if event.enter eq 1 then $
print, 'You just entered the Draw widget $
else $
print, 'You just left the draw widget'

endif else begin

;process other events here

endelse
end

pro widgetTest
base = widget_base()
draw = widget_draw(base, xsize=20,ysize=20,/tracking)
widget_control, base, /realize
xmanger, "test", base, event_handler = "testEvent"
end

Hope this helps,
Phil

--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
[Message index]
 
Read Message
Previous Topic: Re:Need help for: wwdrawing and image_display in Wave
Next Topic: IDL mode for Alpha?

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

Current Time: Fri Oct 10 08:25:19 PDT 2025

Total time taken to generate the page: 0.16069 seconds