Prog_Bar Frequently Asked Questions
Answers
Can I use Prog_Bar to create a counter, and if so, how?
Yes, Prog_bar can easily be used to create a stand alone counter. Just switch on the bar's text display, set either the width or height (or both) to zero and update the bar as normal.
The only tricky bit is getting the co-ordinates right. The reason for this is that the co-ordinates you supply are for the invisible bar, not the text, and the actual text position is relative to the bar. The text will always remain a fixed distance away from the nearest edge of the bar, and will be centred with respect to it.
As an example, if you want your counter to start at a set point on the screen, no matter how its length changes, you would set the text to appear on the right of the bar, and the bar's horizontal position would need to be to the left of the desired counter position.
Likewise, if you want your counter to be centred horizontally on a particular point, you could set the text to appear above (or below) the invisible bar, and the bar's vertical position would then need to be slightly below (or above) the desired position. The horizontal position would depend on the width of the bar, even though the imagery is not visible.