# Scroll works on Mac but not Windows 10

**URL:** <https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623>\
**Category:** Getting Started\
**Created:** [April 9, 2021, 6:26pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623 "2021-04-09T18:26:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 9, 2021, 6:26pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/1 "2021-04-09T18:26:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [April 9, 2021, 6:43pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/2 "2021-04-09T18:43:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 9, 2021, 7:38pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/3 "2021-04-09T19:38:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [April 9, 2021, 7:43pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/4 "2021-04-09T19:43:32Z")

</div>

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](https://mrdoob.com/lab/javascript/effects/solitaire/). 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

---

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 10, 2021, 6:38pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/5 "2021-04-10T18:38:39Z")

</div>

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.

 ![Screen Shot 2021-04-10 at 2.35.05 PM](https://forum.xojo.com/uploads/default/original/2X/b/b74f9f0a5733267f874507db9b4f89100a4b3942.jpeg) ![Screen Shot 2021-04-10 at 2.34.15 PM](https://forum.xojo.com/uploads/default/original/2X/8/863d156d8f3118d9207ab8adaf925465c38d74ed.jpeg) ![Screen Shot 2021-04-10 at 2.33.53 PM](https://forum.xojo.com/uploads/default/original/2X/9/9a9e1bd7a55ab3e8e36a56a633671ce77d42b27d.jpeg)

---

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 10, 2021, 7:18pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/6 "2021-04-10T19:18:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [April 10, 2021, 7:22pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/7 "2021-04-10T19:22:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 10, 2021, 7:49pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/8 "2021-04-10T19:49:26Z")

</div>

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.

> **[Test scroll long window 2.xojo\_binary\_project](https://www.dropbox.com/s/2e1yqj0z53homkc/Test%20scroll%20long%20window%202.xojo_binary_project?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [April 10, 2021, 7:55pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/9 "2021-04-10T19:55:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [April 10, 2021, 8:07pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/10 "2021-04-10T20:07:44Z")

</div>

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:

> **[TestForGaryScrollExample.xojo\_binary\_project](https://www.dropbox.com/s/0f35kpieqgv3k4b/TestForGaryScrollExample.xojo_binary_project?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![Gary\_Huett1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@Gary\_Huett1](https://forum.xojo.com/u/Gary_Huett1)\
**Post date:** [April 10, 2021, 8:26pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/11 "2021-04-10T20:26:28Z")

</div>

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

Thank you very much!

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [April 11, 2021, 12:35pm UTC](https://forum.xojo.com/t/scroll-works-on-mac-but-not-windows-10/62623/12 "2021-04-11T12:35:23Z")

</div>

> [@anon20074439](#):
>
> The first line, why do you want the scrollbar on the window to change the position of the window the scrollbar is on?

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? 🤔
