Skip to end of metadata
Go to start of metadata

Description

Returns the minimum width required to fit the given text string using the given font.

C#
vb.net

Parameters

text
The text string whose width will be calculated.
font
The font that will be used to format the text.
desiredHeight
The height, in character units, of the cell or area into which the text will be inserted.

Returns

The minimum width, in character units, required to accomodate the given text string.

Remarks

The maximum width of any one column is 409 character units, so if the width return is greater than 409, you must merge cells across multiple columns and set the width of each column to accomodate the total minimum width of the text.

Examples

C#
vb.net
  • No labels