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

Home » Public Forums » archive » The proper way of catching mouse button events from a 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
The proper way of catching mouse button events from a draw widget? [message #50793] Wed, 18 October 2006 05:14
Braedley is currently offline  Braedley
Messages: 57
Registered: September 2006
Member
In many of my programs (be it command line or widgets), I often need
the user to enter a bounds of a particular graph by clicking on it.
With basic windows, it's just using cursor like so:

cursor, x1, junk, /data
plots, [x1, x1], !y.crange, /data, color=254 ;color=red
cursor, x2, junk, /data
plots, [x2, x2], !y.crange, /data, color=254 ;color=red

Reading through the widget_draw documentation, they suggest that cursor
not be used for this type of thing, but instead use mouse events. This
is despite the fact that using cursor hasn't caused any problems at all
in my widget programs. However, I would still like to use the proper
implementation whenever possible. So the question becomes, how do I
grab mouse events only when I want them, and then return to the proper
point in the current event handler?

Braedley
[Message index]
 
Read Message
Previous Topic: vector of bin indices using histogram?
Next Topic: filled usersym

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

Current Time: Fri Oct 10 15:07:03 PDT 2025

Total time taken to generate the page: 1.75667 seconds