To determine the width of a string in pixels using the active font and output it’s best to use this method:
(* sString - (string) Can be any string constant or variable.
**
** For example:
** TCanvas.TextWidth(’m3Rlin’);
** TCanvas.TextWidth(Edit1.Text);
** TCanvas.TextWidth(OpenDialog1.FileName);
[...]
Merlin’s Delphi Forge