Spread Windows Forms 18
GrapeCity.Spreadsheet Assembly / GrapeCity.Drawing Namespace / IDrawingContext Interface / MeasureText Method / MeasureText(String,Font,Size,DrawingTextFormat,Double) Method
String content
Font to measure
The current boundary size.
DrawingTextFormat structure that specifies the drawing text format.


In This Topic
    MeasureText(String,Font,Size,DrawingTextFormat,Double) Method
    In This Topic
    Measure the size of a string in the context.
    Syntax
    'Declaration
     
    
    Overloads Function MeasureText( _
       ByVal str As String, _
       ByVal font As Font, _
       ByVal size As Size, _
       Optional ByVal drawingTextFormat As DrawingTextFormat, _
       Optional ByVal rotation As Double _
    ) As Size
    'Usage
     
    
    Dim instance As IDrawingContext
    Dim str As String
    Dim font As Font
    Dim size As Size
    Dim drawingTextFormat As DrawingTextFormat
    Dim rotation As Double
    Dim value As Size
     
    value = instance.MeasureText(str, font, size, drawingTextFormat, rotation)

    Parameters

    str
    String content
    font
    Font to measure
    size
    The current boundary size.
    drawingTextFormat
    DrawingTextFormat structure that specifies the drawing text format.
    rotation

    Return Value

    The size of displayed string.
    See Also