Jitter / Shaking in progress bar gadgets

Just starting out? Need help? Post your questions and find answers here.
Bo Marchais
User
User
Posts: 61
Joined: Sun Apr 03, 2016 12:03 am

Jitter / Shaking in progress bar gadgets

Post by Bo Marchais »

(Edited because changing from 0 to 100 scale to 0 to 10000 scale cleared up the problem)

When using progress bar gadgets (Windows), I often see "shaking" in the displayed segment.
I thought it was the scaling of the value I am writing out, but I can't see how it would happen.
I have never seen the problem in VB/Powerbasic/etc. I assumed it was a window update jitter issue.
I don't care about delay or if the update cycle is slow.

My problem is that visually it appears the value is switching back and forth at certain intervals...
for example, it acts as if I had written out:
45
46
47
48
47 <-- jumps back
48
49
50
51
52
53
52 <-- jumps back
53
54.... etc.

Using debug to watch "barval" before SetGadgetState(1, barval) which shows 0 to 100 as expected... the data never decreases. However- visually, it still does.

I fixed this by changing max number from 100 to 10,000. Sorry to have posted this question, since I resolved the issue...
There must be internal scaling that was having rounding difficulties due to the size of my graphs. Thank you all!