Skybound AutoComplete

MeasureItemEventArgs.MeasureText Method ()

Measures the dimensions of the item text.

[Visual Basic]
Overloads Public Function MeasureText() As Size
[C#]
public Size MeasureText();

Return Value

A Size structure that represents the dimensions of the text.

Remarks

This method measures the dimensions of text as it would be drawn on the graphics surface.

MeasureText uses GDI to measure, whereas Graphics.MeasureString uses GDI+). DrawText also uses GDI, so if you use DrawText, be sure to use MeasureText to measure, since GDI and GDI+ will return different dimensions for the same text.

See Also

MeasureItemEventArgs Class | Skybound.AutoComplete Namespace | MeasureItemEventArgs.MeasureText Overload List