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

Home » Public Forums » archive » Cursor Position with Draw Widget
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: Cursor Position with Draw Widget [message #3099 is a reply to message #3090] Wed, 02 November 1994 15:56 Go to previous message
scott is currently offline  scott
Messages: 17
Registered: January 1994
Junior Member
Ken Ganga writes
> Hi,
>
> I'm trying to figure out how to return the cursor position from an
> event in a draw widget. I want the coordinates to be in data
> coordinates. This seems to be possible for a regular graphics window
> through the cursor command, but I can't figure out how to do it within
> a draw widget as the documentation says not to use the cursor command.
>
> Any help would be appreciated. Thanks,
>
> Ken

You get the coordinates directly from the event structure returned when
the user clicks in the Draw Widget. They are in event.X and event.y, in
device coords. To get the coords in data coords, do the following:

coords = CONVERT_COORD(event.X, event.Y, /DEVICE, /TO_DATA)

See page 1-340 of the IDL Reference Guide (v. 3.6.1) for more info, or
feel free to email me.


--
A. Scott Denning (303)491-8346
<scott@abyss.atmos.colostate.edu>
Dept. of Atmospheric Science
Colorado State University
Fort Collins, CO 80523
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with Exclusive Button Widgets under IDL for Windows (V3.6.1)
Next Topic: .AVI reader in IDL

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

Current Time: Wed Oct 08 19:19:46 PDT 2025

Total time taken to generate the page: 0.00422 seconds