Xceed SmartUI for WinForms v3.6 Documentation
Xceed.SmartUI.v3.6 Assembly / Xceed.SmartUI Namespace / SmartPaint Class / GetStringHeight Method / GetStringHeight(String) Method
The string whose height is to be retrieved.


In This Topic
    GetStringHeight(String) Method
    In This Topic
    Retrieves the height of the specified string assuming that the string will be drawn on one line.
    Syntax
    'Declaration
     
    Public Overloads Function GetStringHeight( _
       ByVal text As String _
    ) As Integer
    'Usage
     
    Dim instance As SmartPaint
    Dim text As String
    Dim value As Integer
     
    value = instance.GetStringHeight(text)
    public int GetStringHeight( 
       string text
    )

    Parameters

    text
    The string whose height is to be retrieved.

    Return Value

    A value representing the height of text.
    Remarks

    The Font and StringFormat are taken into consideration when calculating the height of the string.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also