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 #40655 is a reply to message #40654] Wed, 25 August 2004 10:11 Go to previous messageGo to previous message
dcw_yip is currently offline  dcw_yip
Messages: 22
Registered: October 2003
Junior Member
I can't do the second solution since my images tend to be fairly large
and regular scrolling just won't do.

But the insight by the previous poster about the key presses vs
releases and your first solution is a good work around. It's a little
bit more complicated since you have to take into account double clicks
since they are ok. But here's the modified bug.pro that works
properly now. It would still be nice if RSI could fix this at some
point.

David

--------------- program -----------------

pro bug_event, event
if !version.release eq '6.1' and $
!version.os_family eq 'Windows' and $
event.type eq 0 and event.clicks ne 2 then event.y -= 600

print, event.x, event.y
end

pro bug
base = widget_base(title='bug')
draw = WIDGET_DRAW(base, /button_events, /app_scroll,
graphics_level=2)
widget_control, draw, xsize=600, ysize=600, draw_xsize=1200,
draw_ysize=1200
widget_control, base, /realize

xmanager, 'bug', base
end

David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b956d2c35ad426a989851@news.frii.com>...
> 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
[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 22:59:05 PDT 2025

Total time taken to generate the page: 0.71770 seconds