I'd just call the relevant Windows API, which in this case appears to be GetTextExtentPoint32().
http://msdn.microsoft.com/en-us/library/dd144938(v=vs.85).aspx HTH Stephen Posey stephenlpo...@earthlink.net -----Original Message----- >From: Peter Kapas <pka...@sbcglobal.net> >Sent: Nov 1, 2011 12:20 PM >To: delphi@elists.org >Subject: D4 Canvas.TextWidth question > >Hi, > >How to solve the bug of D4 for TComboBox.Canvas.TextWidth. It does not work. >Of course it works in D7 and above, but I have only D4. Is there some function >to get CharWidth for any different Fonts? > >Thanks, >Peter > >_______________________________________________ >Delphi mailing list >Delphi@elists.org >http://lists.elists.org/cgi-bin/mailman/listinfo/delphi _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi