Gets the width of a string.

Namespace: Imsl.Chart2D
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public static int GetStringWidth(
	string target,
	Font font
)
Visual Basic (Declaration)
Public Shared Function GetStringWidth ( _
	target As String, _
	font As Font _
) As Integer
Visual C++
public:
static int GetStringWidth(
	String^ target, 
	Font^ font
)

Parameters

target
Type: System..::.String
A string to measure.
font
Type: System.Drawing..::.Font
A Font object that defines the text format of the string.

Return Value

An int that represents the size, in pixels, of the string specified by target as drawn with font.

See Also