To calculate the real-estate the text will use you can use the
var
aSize :TSize;
begin
aSize := Canvas.TextExtent('Your Text');
Clientwidth := aSize.cx;
End;
This will return a TSize and that has members CX, and CY, they report the width and height of canvas
needed.