TXTextControl.TextPartCollection.GetItem Method

Gets a certain text part from the collection.

GetItem()

Gets the text part with the input focus.

[C#]
public object GetItem();
[Visual Basic]
Public Function GetItem() As System.Object

GetItem(Point)

Gets the text part with the input focus informing about the offset of the text part in the TextControl's client area.

[C#]
public object GetItem(out System.Drawing.Point clientOffset);
[Visual Basic]
Public Function GetItem(ByRef clientOffset As System.Drawing.Point) As System.Object
Member Description
clientOffset

Retrieves the text part's offset, in pixels, in the TextControl's client area.

GetItem(Point, Point)

Gets the text part at the specified geometric location.

[C#]
public object GetItem(System.Drawing.Point location, out System.Drawing.Point clientOffset);
[Visual Basic]
Public Function GetItem(ByVal location As System.Drawing.Point, ByRef clientOffset As System.Drawing.Point) As System.Object
Member Description
location

Specifies a location where to search for a text part. The point must be specified in pixels with an origin at the top left corner of the control.

clientOffset

Retrieves the text part's offset, in pixels, in the TextControl's client area.

Return Value

The return value is the found text part, which is either the text part with the input focus or the text part at the specified location. It can be an object of the type MainText, TextFrame or HeaderFooter. All of these objects implement the IFormattedText interface. The first and the second implementation return null, if there is no text part with the input focus. This can happen, if an image is selected, or if another application or component has the input focus.

See Also