Andrew, yes, that's exactly what I was planning to do, but I'm using B4XProgressBar, and it won't let me read the width... there's no ".Width" for it.
I've somewhat worked around it for now... in the B4XProgressBar create method, I can read the width at mBase.Width, and I'm saving that in a global variable, which I can use later.