Spread WPF 18
GrapeCity.Wpf.SpreadSheet.CellType.Editors Namespace / GcTextBox Class / GetRectFromCharacterIndex Method / GetRectFromCharacterIndex(Int32,Boolean) Method
The zero-based character index of the character for which to retrieve the bounding rectangle.
true to get the trailing edge of the character; false to get the leading edge of the character.


In This Topic
    GetRectFromCharacterIndex(Int32,Boolean) Method
    In This Topic
    Returns the rectangle for the leading or trailing edge of the character at the specified index.
    Syntax
    'Declaration
     
    Public Overloads Function GetRectFromCharacterIndex( _
       ByVal charIndex As Integer, _
       ByVal trailingEdge As Boolean _
    ) As Rect
    'Usage
     
    Dim instance As GcTextBox
    Dim charIndex As Integer
    Dim trailingEdge As Boolean
    Dim value As Rect
     
    value = instance.GetRectFromCharacterIndex(charIndex, trailingEdge)
    public Rect GetRectFromCharacterIndex( 
       int charIndex,
       bool trailingEdge
    )

    Parameters

    charIndex
    The zero-based character index of the character for which to retrieve the bounding rectangle.
    trailingEdge
    true to get the trailing edge of the character; false to get the leading edge of the character.

    Return Value

    A bounding rectangle for the character at the specified character index, or System.Windows.Rect.Empty if a bounding rectangle cannot be determined.
    Exceptions
    ExceptionDescription
    charIndex is negative or greater than the length of the content.
    See Also