Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditView.GetCursorBounds() Method

Gets the caret coordinates in the current document’s view.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

public virtual Rectangle GetCursorBounds()

#Returns

Type Description
Rectangle

The rectangle encompassing the caret measured in DocumentLayoutUnit.Pixel

#Remarks

Use the GetCursorBounds method to determine the caret location and dimensions of the character box encompassing the caret in the current view. This may be useful for custom drawing on the document.

To calculate the DocumentPosition for a given point, and vice versa, use the RichEditControl.GetPositionFromPoint and the RichEditControl.GetBoundsFromPosition methods.

See Also