[]
        
(Showing Draft Content)

GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.GetRectFromCharacterIndex

GetRectFromCharacterIndex Method

GetRectFromCharacterIndex(int)

Returns the rectangle for the leading edge of the character at the specified index.

Declaration
public Rect GetRectFromCharacterIndex(int charIndex)
Public Function GetRectFromCharacterIndex(charIndex As Integer) As Rect
Parameters
Type Name Description
int charIndex

The zero-based character index of the character for which to retrieve the rectangle.

Returns
Type Description
Rect

A rectangle for the leading edge of the character at the specified character index, or Rect.Empty if a bounding rectangle cannot be determined.

Exceptions
Type Condition
ArgumentOutOfRangeException

charIndex is negative or greater than the length of the content.

GetRectFromCharacterIndex(int, bool)

Returns the rectangle for the leading or trailing edge of the character at the specified index.

Declaration
public Rect GetRectFromCharacterIndex(int charIndex, bool trailingEdge)
Public Function GetRectFromCharacterIndex(charIndex As Integer, trailingEdge As Boolean) As Rect
Parameters
Type Name Description
int charIndex

The zero-based character index of the character for which to retrieve the bounding rectangle.

bool trailingEdge

true to get the trailing edge of the character; false to get the leading edge of the character.

Returns
Type Description
Rect

A bounding rectangle for the character at the specified character index, or System.Windows.Rect.Empty if a bounding rectangle cannot be determined.

Exceptions
Type Condition
ArgumentOutOfRangeException

charIndex is negative or greater than the length of the content.