I have something “strange” going on with a progress bar on a window in a desktop app. I’m running xojo 2020 r2.1.
When I build a program that has a progress bar (and so far none of the other ones seem to have this issue) the mac version runs just fine. I see the progress bar, and it acts just fine as I expect. However the Windows built version (in windows 10) the progress bar does not show. I have deleted and readded it, moved it to a different location on the window but it never appears.
If you have a long-running method that is not in a thread, you won’t see the progressbar on Windows. It’s an OS difference. Even on Mac, it would be best to put the process in a Thread.
If it’s that and not another issue then popping a ProgressBar.Refresh(False) into the mix should get around that but don’t do it too often or you spend more time updating the UI instead of running code.
This is not in a thread.
I am using a progress bar to act as a visual representation of the number of items in a specific group. Not what it is made for, but it works aesthetically and I like it so…
@JulianS’s first answer contains good questions, such as “ 1. Does it appear if you make a brand new project?”. These steps would indicate where the problem lies in your specific case.
Had a second to do a test.
Built a new project, and put a progress bar on it. It shows under windows.
Doesn’t explain why the progress bar shows in my REAL program with a mac build but not with a windows build.
Have an idea or two and will update after it is tried.
Nice. Don’t hesitate to ask or provide information which you think can be useful in determining the issue in your specific project.
Searching cases in Feedback is also a great way to determine whether you’ve encountered a known bug and don’t have to spend too much time in trying to recreate yourself.
Your other Windows 10 machine might be corrupted; any other weird behaviours you noticed on it?
At the very least, there are settings that differ there.
“Final” (yeah right…) update on this. I ran the program on a windows 8.1 vm and a windows 10 vm and the progress bar shows up fine. But not on my corporate machine. So, as Arnaud advised it might be something with the Windows 10 version I have on that machine.
I’m going to try a different windows 10 version I have running around - somewhere - and if I get any different results I will advise.
FWIW, I once had weird visual issues with an application (nothing to do with Xojo) under Windows - I got different results from everyone else using the program. Turned out to have been caused by the “theme” I’d selected in Windows.