Canvas scroll 2018.1 Windows

When using 2018.1 the canvas scroll in a program It is not working correctly anymore. When scrolling everything is painted over each other. Looks like everything scrolls the opposite way compared to previous versions of XOJO?

first off… what platform?
if macOS, then the scroll direction is by “default” the opposite of what I consider normal
this can be changed with a simple declare (i’ll post when I find it)

As to the writing over… that depends on the code in the canvas… .did you write it? is a 3rd party control? since there is no “native” canvas scroll feature

Windows. It worked fine in the previous versions 2017.3 en before.

I use a container with a canvas en scrollbars

canvas paint event:
g.ClearRect(0, 0, g.Width, g.Height)
g.DrawPicture PICmain,XScroll,YScroll

hortizontal scrollbar valuechange:

TScroll = XScroll
XScroll = -1*(SBhorz.Value / 100 * (PICmain.Width+1))/2
cv.Scroll YScroll - TScroll, 0

vertical scrollbar valuechange:
TScroll = YScroll
YScroll = -1*(SBvert.Value / 100 * (PICmain.Height+1))/2
cv.Scroll 0, TScroll - YScroll

my point is WHAT worked… code YOU wrote? or a 3rd party control?

either way if the methods employed were on a deprecation list (for example), then 2018 may have removed them… or it may be an issue with Direct2D, or it may be a “bug”…

code i wrote

Canvas.scroll works like it used (at least in my test)
Check if the values that you get to scroll are correct (or changed…)

Coen, can you post up a test project that shows the problem?

I will try to make a test project.

In my windows desktop project the scrolling canvas-forms still works with 2018r1, but where it was quite smooth in 2017r3, it’s scrolls quite messy in 2018r1. In fact not to be given to a customer.

Do you have a video Joost? Or a quick demo app of it being messy?

Will post a comparisson video tommorow.

Demo app would be MUCH more useful …

Big project and hard to isolate the code in charge.

On the MAC it works flawless, but not on Windows.

Sample project:
https://www.dropbox.com/s/4o94lnwszh79z96/testcanvasWinScroll.xojo_binary_project?dl=0

Thanks Coen, give me a few, I’m just sorting a project for someone else and putting in a new bug report.

[quote=384152:@Coen Martinus]On the MAC it works flawless, but not on Windows.

Sample project:
https://www.dropbox.com/s/4o94lnwszh79z96/testcanvasWinScroll.xojo_binary_project?dl=0[/quote]

The difference between 2017r3 and 2018r1 is that the canvas probably isn’t repainting on a Scroll. You’ve probably found a bug there (I’ll let you put that one in :)) but to get around it for now put the following at the bottom of SBvert.ValueChanged and SBhorz.ValueChanged

CV.Invalidate(false)

Thanks. I will test it tomorrow.