Board index » delphi » string width

string width

Hi,

    Is there any function to return the string width?
    How can I determine the width of a font character?

Thank
Chris

 

Re:string width


Christian Gilbert <christi...@videotron.ca> schrieb in im Newsbeitrag:
JxJe6.6632$H_5.65...@weber.videotron.net...

Quote
> Hi,

>     Is there any function to return the string width?
>     How can I determine the width of a font character?

Hi,
use a TCanvas with Font property attributes set to your values
and call TCanvas.TextWidth('YourText'); .

HTH
-- Florian Haag
http://private.addcom.de/haag/fh/

Other Threads