An instance of the Document
public sealed class DocumentLinkCollection: TextFieldCollectionBase
Public NotInheritable Class DocumentLinkCollection
Inherits TextFieldCollectionBase
The following example shows how to use the TXText
//create new documentLink
TXTextControl.DocumentLink newLink = new TXTextControl.DocumentLink("Jump to page 1", newTarget);
//Add "newLink" to textControl1
if (textControl1.DocumentLinks.CanAdd)
{
textControl1.DocumentLinks.Add(newLink);
textBox1.Text = "DocumentLink Name: " + newLink.Name + " could be added" + Environment.NewLine +
"Id is: " + newLink.ID + Environment.NewLine + //-->> not in TX28 Documentation
"textControl1.DocumentLinks.Count is: " + textControl1.DocumentLinks.Count + Environment.NewLine + Environment.NewLine";
}
else textBox1.Text = "DocumentLink text: " + newLink.Name + "could NOT be added" + Environment.NewLine + Environment.NewLine";
Dim newLink As TXTextControl.DocumentLink = New TXTextControl.DocumentLink("Jump to page 1", newTarget)
If textControl1.DocumentLinks.CanAdd Then
textControl1.DocumentLinks.Add(newLink)
textBox1.Text = "DocumentLink Name: " & newLink.Name & " could be added" + Environment.NewLine & "Id is: " + newLink.ID + Environment.NewLine & "textControl1.DocumentLinks.Count is: " + textControl1.DocumentLinks.Count + Environment.NewLine + Environment.NewLine
";"
Else
textBox1.Text = "DocumentLink text: " & newLink.Name & "could NOT be added" + Environment.NewLine + Environment.NewLine
End If
Method | Description |
---|---|
Add | Inserts a new document link at the current input position. |
Clear | Removes all document links from a Text Control document. |
Copy |
Copies the elements of the collection to an array, starting at a particular index. |
Get |
Returns an enumerator that can be used to iterate through the collection.
(Inherited from Text |
Get |
Gets a particular document link from the collection. |
Remove | Removes a document link from a Text Control document. |
Property | Description |
---|---|
Can |
Gets a value indicating whether a new text field can be inserted at the current input position.
(Inherited from Text |
Count | Gets the number of elements contained in the collection.
(Inherited from Text |
Is |
Returns true if the collection is designed to be thread safe, otherwise, it returns false.
(Inherited from Text |
Item | Gets the field with the specified number from the collection. |
Sync |
Gets an object that can be used to synchronize access to the collection.
(Inherited from Text |