TXTextControl.MisspelledWordCollection.GetItem Method

Gets a particular item from the collection.

GetItem()

Gets the misspelled word at the current text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the current input position and the end of the text, the first word is returned.

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

GetItem(MisspelledWordKind)

Gets the misspelled word of the specified kind at the current text input position. If there is no misspelled word, the next possible word of is returned. If there is no misspelled word of the specified kind between the current input position and the end of the text, the first word of the specified kind is returned.

[C#]
public MisspelledWord GetItem(MisspelledWordKind kind);
[Visual Basic]
Public Function GetItem(ByVal kind As MisspelledWordKind) As MisspelledWord
Parameter Description
kind

Specifies the word's kind. It must be one or more values of the MisspelledWordKind enumeration.

GetItem(Point)

Gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.

[C#]
public MisspelledWord GetItem(System.Drawing.Point location);
[Visual Basic]
Public Function GetItem(ByVal location As System.Drawing.Point) As MisspelledWord
Parameter Description
location

Specifies the word's location. The point must be specified in pixels with an origin at the top left corner of the control. If there is no misspelled word at the specified location, null is returned.

GetItem(Int32)

Gets the misspelled word at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified input position and the end of the text, the first word is returned.

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

Specifies a zero-based text postion. The text positions in front of a word and behind a word belong to the word. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified text position and the end of the text, the first word is returned.

GetItem(Int32, MisspelledWordKind)

Gets the misspelled word of the specified kind at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word of the specified kind between the specified input position and the end of the text, the first word of the specified kind is returned.

[C#]
public MisspelledWord GetItem(int textPosition, MisspelledWordKind kind);
[Visual Basic]
Public Function GetItem(ByVal textPosition As Integer, ByVal kind As MisspelledWordKind) As MisspelledWord
Parameter Description
textPosition

Specifies a zero-based text postion. The text positions in front of a word and behind a word belong to the word. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified text position and the end of the text, the first word is returned.

kind

Specifies the word's kind. It must be one or more values of the MisspelledWordKind enumeration.

Return Value

The return value is null, if a misspelled word could not be found. Otherwise, it is an object of the type MisspelledWord.

See Also