Page 1 of 1

Jitter / Shaking in progress bar gadgets

Posted: Mon Apr 25, 2016 8:41 pm
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!