Page 1 of 1

Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Posted: Tue Jan 15, 2019 11:00 am
by raphaelgj
I have a simple listbox with around 70 items in it.
If I click and move the SCROLLBAR, it's really smooth and there is no delay whatsover.
If I scroll with the MOUSEWHEEL, it's incredibly choppy and delayed, slow.

Why is that and how can it be fixed?

Check this recording to see it in action using the simplest example:
https://imgur.com/a/ckROd2E

In the example I scroll the mousewheel fast so it should go to the top quickly but it "lags" all the way in a very delayed fashion.
That would be very frustrating for the end user. :)

Re: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Posted: Tue Jan 15, 2019 11:36 am
by jvierra
The scroll increment is set too high. The scroll on a ListBox can only be set by line - the scrollbar moves by pixel. The system and user preferences control this.

Here are two files. Place them in a new temp folder and open the PSF and run it. It is a demo of how to use a ListBox and also scrolls smoothly. If it doesn't on your system then check your system settings.

The CSV file is a good one to have as it is a complete file of all states and cities and is used here to show how to set up synchronized views with two ListBoxes.

Re: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Posted: Tue Jan 15, 2019 11:45 am
by raphaelgj
Thank you, however the same behaviour is present. If I give the scrollwheel a long scroll, it will scroll up the distance but not instantly like it would in notepad for example, it does it over 1-2 seconds...

Re: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Posted: Tue Jan 15, 2019 12:13 pm
by jvierra
Then your issue is not a scripting issue. It is a system issue and you need to check your mouse settings. The issue may also be a result of a high DPI monitor. If so then you will need to set the form up for high DPI use.

Re: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Posted: Wed Jan 16, 2019 8:12 am
by davidc
In regards to high DPI, I recommend this article:

https://info.sapien.com/index.php/guis/ ... i-displays