TXTextControl.SubTextPartCollection.GetItem Method

Gets a particular subtextpart from the collection.

GetItem()

Gets the subtextpart at the current text input position. If there is more than one textpart at the current input position the textpart with the highest level is returned.

[C#]
public SubTextPart GetItem();
[Visual Basic]
Public Function GetItem() As SubTextPart

GetItem(String)

Gets the subtextpart with the specified name. The method returns null, if such a textpart does not exist. If more than one textpart with this name exists, the first found textpart is returned.

[C#]
public SubTextPart GetItem(string name);
[Visual Basic]
Public Function GetItem(ByVal name As String) As SubTextPart
Parameter Description
name

Specifies the textpart's name set with the Name property. The method returns null if a textpart with the specified name does not exist.

GetItem(Int32)

Gets the subtextpart with the specified id. The method returns null, if such a textpart does not exist. If more than one textpart with this id exists, the first found textpart is returned.

[C#]
public SubTextPart GetItem(int id);
[Visual Basic]
Public Function GetItem(ByVal id As Integer) As SubTextPart
Parameter Description
id

Specifies the textpart's identifier. The method returns null if a textpart with the specified identifier does not exist.

Return Value

The return value is null, if a subtextpart with the specified parameters could not be found. Otherwise, it is an object of the type SubTextPart.

See Also