Win32Prn() > Font and text metrics xHarbour Developers Network  

oWin32Prn:getTextWidth()

Returns the width of a character string in pixels.

Syntax

:getTextWidth( <cString> ) --> nPixelsWidth

Arguments

<cString>
This is a character string to determine the width for.

Description

The method :getTextHeight() determines the maximum width of a character string in pixels and returns the result as a numeric value. This is especially useful when a proportional font is selected where different characters require a different amount of space. The letter "i" needs less space than "W", for example.


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe