Scroll works on Mac but not Windows 10

I created a desktop app with a canvas and a vertical scrollbar for a window that is 3000+ points long and it works fine in the Mac. It doesn’t work in Windows. The window is less than full screen height at startup and the scrollbar goes spastic when used in Windows. Any ideas.

I also tried a canvas scroll in windows and it never goes beyond the original full window screen length in Windows even though the canvas and window are longer than that.

Can you show how you implemented scrolling? It’s likely related. I haven’t had an issue with container controls, scroll bar, and setting the .Top value.

Sure.

In Scrollbar Open event
Me.MaximumValue = 4390

In Scrollbar ValueChanged event
Expensewindow.top = -me.value + 30

ExpenseWindow.MouseWheel event
Scrollbar1.value = (deltay * 30) + Scrollbar1.value

That doesn’t seem like anything there. Perhaps we’re miscommunication on what effect you’re seeing? The term you used implies jumping and jittery to me. As in, you’re actually losing control of things from what I understand. This I’d be curious to see and help resolve. Could you reproduce the problem in a slimmed down example project?

What I can say I have seen is poor redrawing with trailing copies of controls and text. Sort of the Solitaire win effect. I believe that can be fixed with a final time delayed .refresh of the window.

Update: For additional attention to detail, my scrolling implementations have not been of anything to the scale of 3000px/pt

Thanks!
Here are two pics of the PC jittering - and one of the Mac where it works.
On the PC it jitters unreadably when I try and scroll and then if I scroll down past half way, the window closes.

How do you upload a sample project? I have one but don’t see how to upload it. Hyperlink???

I noticed the jittering is related to the
Scrollbar Open event
Me.MaximumValue = 4390
If I lower this the jittering slows proportionally.

But the other problem is I still never get the full window to show. Only about 800 px.

Amazon Drive, Dropbox, Google Drive, OneDrive, MediaFire, take your pick, upload the file to one of those then post the link.

Thank you!
Here is the link to the sample project.

In Mac the window shows as 1422 px in the textfield - which is correct - and it scrolls the length of it.

On the PC the window shows as 823 px in the textfield - which is incorrect - and it won’t show the rest of the window.

The first line, why do you want the scrollbar on the window to change the position of the window the scrollbar is on? This is where your flickering is coming from. The window is moving, then the position of the scrollbar changes due to the window moving, which triggers another move, so its bouncing back and fore. It probably doesn’t happen on the mac because (I assume) windows can’t go higher than the top of the screen.

Also, don’t put your scrollbar inside your canvas if you’re trying to move the canvas as that will do the same thing, move it outside the canvas.

1 Like

Here’s an example I made a long time ago for something else, it shows (one method) of scrolling a large area of content.

I don’t really know why there’s not a good example of this type of thing included with Xojo, maybe its something for one of the newer devs to work on for a blog post and to be included in future examples:

2 Likes

That’s very helpful.
Good suggestions.
I’ll try the container control. That seems to work well in your example.

Thank you very much!

Yes, I was wondering this too. Strangest thing I ever saw. Window moved up the screen like gangbusters and vanished under the menu bar. Was it something I said? :thinking: