I have 15 to 20 labels with variable text sizes and text boxes arranged in the forms. Text boxes are arranged next to labels. The font and color of the form and hence the form controls can be configured by the user at run time. When I right align the labels and set auto grow property to true and whenever the font style changes (say from Arial to Georgia) the right aligned labels are no more right aligned.
I need a solution on labels (for winforms) to automatically grow to the left when the font size changes.
Set your label properties as folowing;
AutoSize = false;
TextAlign = TopRight (or anything to right)
Then manually resize your label to a maximum area to fit your longest text. That worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With