I am trying to get it so when I resize a form the labels on that form resize accordingly.For what is worth the resize will only occur when the 'WMExitSizeMove' procedure triggers. Edit: I would prefer a scale aproach which wont resize beyond or beneath the constraints
Ideally what I would like is to get some form of 'scale' value based on how much the form has grown or shrunk. Then I could apply this scale factor to all controls on the form / panel.
I however will accept that labels font size will resize to the highest possible size of the label.heights property ( I would use width but that value doesn't seem to change ever as the caption is static).
I have a label, I place it onto the form, give it all anchors (left,right,top and bottom are all true) constraints are set so that the control won't look too small or big. I want the label text size to be as big as possible within the controls height and width boundaries. I don't want clipping to occur when the control height is now lower than the text height, at this point I want the resize of label text to go to the largest size possible under the new control height.
Example label.font.size := 11; Label.Height := 15;
Form resizes so label.height is 12
In theory the next best label.font.size would be 9 as no clipping occurs here.
If you would like more description or better clarification please let me know. This has been a royal PITA for me recently.
TLDR: Would like a form resize scale worked out so that I could apply that to all controls, otherwise a way to dynamically resize label.font.sizes to fit new heights / widths on resize.
Also: I have tried Calculate Max Font size I may be incorporating it wrong however when I resize forms the width is static as it seems linked to textwidth.
Edit: In fact I think the scale approach would be best, just can't think of how I'd do this. I am a bit rough on my maths it seems! Also has to fit within constraints.