1. Home
  2. Computing & Technology
  3. Delphi Programming

Get the Height/Width of a Character (for OwnerDrawing and printing)

By , About.com Guide

When using OwnerDrawing or Printing it is good to know the (max) Height and Width of character for a given Canvas - in pixels. The SomeComponents represents a component with a Canvas (the one derived from TWinControl)

~~~~~~~~~~~~~~~~~~~~~~~~~
SomeComponent.Canvas.TextWidth('H') ;
SomeComponent.Canvas.TextHeight('I') ;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» List Devices (LPT, COM ports, ...)
« Change glyphs of TDBNavigator Buttons

Explore Delphi Programming
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2001 Delphi Tips
  7. Get the Height/Width of a Character (for OwnerDrawing and printing)

©2010 About.com, a part of The New York Times Company.

All rights reserved.