I want to put a label inside progress bar. And this label caption is dynamic. How can I get the label position ALWAYS on center inside the ProgressBar?
What I've tried ;
Label1.Parent := progressBar1;
Label1Top := progressBar1.Height div 2;
Label1.Left := progressBar1.Width div 2
It shows ugly, and not in center like I want.
If I set Label1.Left := progresBar1.Width div 2 - xxx
it will be on center only for certain caption. I want to have any caption be placed on center.
Edited Answer from @KenWhite is working good. Solution from @DavidHeffernan just great.