Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3811

Problem Scrolling Canvas

$
0
0

Hello,

I am quite new to Xojo programming. I am trying to scroll a picture in a canvas.

1 - I track the initial position of the mouse (mouse1_x and mouse1_y) in the Canvas (and I finish the code with “Return True”)

2 - In the Mousedrag handler of my Canvas I wrote the following code:

dim delta_x, delta_y As Integer
delta_x = mouse1_x - X
delta_y = mouse1_y - Y

If X <> mouse1_x Or Y <> mouse1_Y Then
me.Scroll(delta_x,delta_y)
end if

The handler is running (I checked with a system.beep) but the canvas doesn’t scroll.

Could it be because I use the Macbook trackpad (click and drag)?

Any idea?

Thank you in anticipation and by the way happy New Year!

12 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3811

Trending Articles