Is there anyway I can get width and height of a string in Pascal Script?
Eg:
var
S: String;
S := 'ThisIsMyStringToBeChecked'
Here I need to return its height and width according to its current font size and font.
I read How to get TextWidth of string (without Canvas)?, but can't convert it to an Inno Setup Pascal code.
I want this measurements (width and height) to change the TLabel.Caption
like 'Too Long To Display'
with clRed
when width of the string of its caption exceeds TLabel.Width
.
Thanks in advance.