GetItem Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets a particular footnote from the collection.
Syntax
GetItem()
Gets the footnote at the current text input position. If there is no footnote, null is returned.
public Footnote GetItem();Public Function GetItem() As FootnoteGetItem(bool)
Gets the next or the previous footnote in the textflow. The search begins at the current text input position.
public Footnote GetItem(bool next);Public Function GetItem([next] As Boolean) As Footnote| Parameter | Description |
|---|---|
| next | If this parameter is true, the next footnote in the textflow is returned. If this parameter is false, the previous footnote in the textflow is returned. The next or the previous footnote is returned independent whether there is a footnote mark at the current text input position. |
GetItem(int)
Gets the footnote with the specified identifier.
public Footnote GetItem(int id);Public Function GetItem(id As Integer) As Footnote| Parameter | Description |
|---|---|
| id | Specifies the footnote's identifier set with the footnote's constructor or the ID property. The method returns null, if a footnote with the specified identifier does not exist. |
GetItem(string)
Gets the footnote with the specified name.
public Footnote GetItem(string name);Public Function GetItem(name As String) As Footnote| Parameter | Description |
|---|---|
| name | Specifies the footnote's name set with set with the footnote's constructor or the Name property. The method returns null, if a footnote with the specified name does not exist. |
Return Value
The return value is null, if a footnote with the specified parameters could not be found. Otherwise, it is an object of the type Footnote.
Examples
The following example works with footnotes in the current document by using FootnoteCollection.get_Item.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FootnoteCollection footnoteCollection = textControl.Footnotes;
footnoteCollection.Add(new Footnote("Source: FY 2026 annual report") { ID = 100 }, false);
Footnote result = footnoteCollection.GetItem(100);
result?.ScrollTo();textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim footnoteCollection As FootnoteCollection = textControl.Footnotes
footnoteCollection.Add(New Footnote("Source: FY 2026 annual report") With { .ID = 100 }, False)
Dim result As Footnote = footnoteCollection.GetItem(100)
If result IsNot Nothing Then result.ScrollTo()