I have a TPanel containing a TLabel and a TStatictText.
The panel can be resized by the user in run-time and I want the TLabel and TStaticText in it to automatically resize thereupon, in order to fit the instantaneous size of the TPanel.
For the Label I do something like:
TLabel.Width := Round (TPanel.Width * 0.9);
TLabel.Height := Round (TPanel.Height * 0.9);
etc.
having set TLabel.OptimalFill to True in the object inspector.
For the TStaticText I would like to do the same, but it doesn't work: the size on the text remains unchanged and, on the other side, for TStaticText there is no OptimalFill property available to set.
I use TStaticText because that inscription has a fixed text and I thought that, when the text is fixed, one should use TStaticText, because maybe it demands less resources.
Do you think that I should use TLabel instead ?