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

Home » Public Forums » archive » Re: Bug with object graphics, app_scroll and the mouse in 6.1 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: Bug with object graphics, app_scroll and the mouse in 6.1 under Windows. [message #40684 is a reply to message #40659] Tue, 24 August 2004 15:20 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Yip writes:

> So I upgraded to IDL 6.1. Now my program doesn't handle mouse events
> properly. I tracked it down and it seems that there's a bug with IDL
> 6.1 under Windows if you have a draw widget with app_scroll and object
> graphics enabled. The symptom is that the y coordinate of the mouse
> event oscillates between the correct value and the correct value plus
> the scroll range. So say the ysize of the widget is 600 and the
> draw_ysize is 800. When you click in the widget so that you're on y
> of 363, it oscillates between 363 and 563 even though you are clicking
> on the same spot over and over again. This didn't happen under 6.0 or
> 6.1 beta. This also doesn't happen on a Mac.
>
> I need both object graphics and scrolling. Is there a way around this
> or should we just drop back to 6.0?

Well, I don't want to point out the obvious here, but
two ways around it occur immediately: (1) just subtract
the amount of the window hidden by the scroll bars from
the Y value on button press events, and (2) use regular
scroll windows rather than app_scroll windows.

(1)

IF !Version.Release EQ '6.1' AND $
!Version.OS_Family EQ 'Windows' THEN $
IF event.type EQ 1 THEN y = event.y - 600 ELSE y = event.y

(2)
draw = Widget_Draw(base, /Button_events, /Scroll, $
XSize=1200, YSize=1200, X_Scroll_Size=600, Y_Scroll_Size=600, $
Graphics_Level=2)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Avoiding FOR loops ?
Next Topic: Animation

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

Current Time: Thu Oct 09 20:25:24 PDT 2025

Total time taken to generate the page: 0.47684 seconds