Good morning all,
Bit of mind boggler this.
I have the following little progress bar thing:

The bar between the two numbers (Stage1 and Stage2, from left to right) is currently centred using the following code:
x = (Stage1.X + Stage1.Width) + (Stage1.Width / 2)
width = Stage2.X - (Stage1.X + Stage1.Width) - (Stage1.Width)
Now this means that if I resize the control, the bar adjusts automatically, like below:

But you can also see that the bar becomes too short to be useful/look any good. So I think I need the width of the bar to be a percentage of the gap between Stage1 and Stage2, and for the X to continue to centre it.
Honestly I'm at a loss on how to do this. Is there anyone better at maths that can help here? Cheers!