Back to Devexpress

RichEditControl.GetBoundsFromPositionF(DocumentPosition) Method

windowsforms-devexpress-dot-xtrarichedit-dot-richeditcontrol-dot-getboundsfrompositionf-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentposition-x29.md

latest2.6 KB
Original Source

RichEditControl.GetBoundsFromPositionF(DocumentPosition) Method

Gets the rectangle representing the character at the specified position.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.XtraRichEdit.v25.2.dll

NuGet Package : DevExpress.Win.RichEdit

Declaration

csharp
public RectangleF GetBoundsFromPositionF(
    DocumentPosition pos
)
vb
Public Function GetBoundsFromPositionF(
    pos As DocumentPosition
) As RectangleF

Parameters

NameTypeDescription
posDocumentPosition

A DocumentPosition, specifying the position in the document.

|

Returns

TypeDescription
RectangleF

A RectangleF representing the area occupied by a character or the System.Drawing.Rectangle.Empty value if the bounds could not be determined. Measured in the units that are in effect.

|

Remarks

You can use the GetBoundsFromPositionF method only for the currently visible part of the document. If the specified position is not displayed, the method returns a System.Drawing.Rectangle.Empty value.

The location and size of the resulting rectangle are expressed in measurement the units which are in effect for the current document. To change the unit of measurement, use the Document.Unit property.

See Also

GetPositionFromPoint(PointF)

Document.Unit

RichEditControl.Unit

RichEditControl Class

RichEditControl Members

DevExpress.XtraRichEdit Namespace