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

Home » Public Forums » archive » Re: problem with widget_draw and draw_button_events under windows
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: problem with widget_draw and draw_button_events under windows [message #53429 is a reply to message #53426] Fri, 13 April 2007 07:50 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Justus Skorps writes:

> Of course you were right about a programming error, I know that one
> click gives two events, and I thought that I had considerd that, but I
> confused the roles of event.press and event.type...now I corrected
> that and it works now very well for the 'get one position'-function.
> But I tried a function to get two positions, and this leads to the
> same problem as before, I get my four values and then the crosshair
> won't like to disappear. I guess this will be due to an similar
> mistake in my code, although both functions have the same if-condition
> at the beginning. But I hope I will find a nice little mistake.

In general, in this kind of situation, I let any button event
that is not a button down event flow though my event handler
without processing. I usually only take action if I get a
button down event:

PRO MY_EVENT_HANDLER, event

IF event.type NE 0 THEN RETURN

; Handle button down events here.
CASE event.press OF
1; Left button
4: Right button
ELSE: ; I don't care.
ENDCASE
END

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fixes For IDL/ENVI Seg Faults Due To Linux X11 & Mesa Library Upgrades
Next Topic: Challenging question - array curve fitting

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

Current Time: Thu Oct 09 22:50:20 PDT 2025

Total time taken to generate the page: 0.40887 seconds