ProgressWheel not animating on visible = True

On clicking the dropdown of a ComboBox, I populate a ListBox with several thousand records and display it in the window. This can sometimes take several seconds. Rather than leaving the user in the dark where they may think the application has crashed, I am thinking of displaying a ProgressWheel on screen while the ListBox is populating.

I set the ProgressWheel visible property to True before the procedure, then set it back to False on completion of the procedure.
Although the visibility is working as intended, the ProgressWheel is not animating when shown. Why is this?

Note: I don’t have to use a ProgressWheel if there is a better method to improve UX so suggestions are welcome.

Your ListBox is populated from within the MainThread, like the ProgressWheel.

One way to improve this may be:
You could process your Data within a Thread and update the Listbox every few cycles within an AddUserInterfaceUpdate event. This would give the UI/ProgressWheel time to update it’s visual state while data is processed in the Thread.

Have you read the Notes for DesktopProgressWheel?

Would this method slow down time to load data vs if there was no ProgressWheel at all?

Keeping the UI uptodate eats a big chunk of your cpu-cores cycles. Maybe updating the UI in intervalls may even speed up the whole process.

BTW: If you add thousands of lines to a ListBox, try disabling the vertical scrollbar while you do this. This may also speed up loading the data into the listbox. :wink:

you could use the mouse cursor but you would still block the ui.

if you have a list with a single column you can fill at once with .AddRows

other concept in this blog