I have a progress bar, i want to update the value from for loop equally
how can i have equal data update?
example if the count of the loop is 10 or if the count is 1000
how can i automate this?
FYI, the minimum value of the progress bar is 0 and the maximum is 100
Divide whatever you current value is (let’s call it x) by the maximum value and then multiple the result by 100.
Be careful however, if x and max are ints then you will end up doing integer division rather than floating point division. You may need to cast one or both to a double or float in that case.