Removes a document link from a Text Control document.
public bool Remove(DocumentLink documentLink);
Public Function Remove(ByVal documentLink As DocumentLink) As Boolean
public bool Remove(DocumentLink documentLink, bool keepText);
Public Function Remove(ByVal documentLink As DocumentLink, ByVal keepText As Boolean) As Boolean
Parameter | Description |
---|---|
document |
Specifies the document link to remove. |
keep |
If this parameter is set to true, the document link is removed without deleting its text. Otherwise, the link's text is also deleted. |
The return value is true, if the document link could be removed. Otherwise it is false.
The following example shows how to use the TXText
//create new documentLink
TXTextControl.DocumentLink newLink = new TXTextControl.DocumentLink("Jump to page 1", newTarget);
//Remove DocLink 'newLink'
if (textControl1.DocumentLinks.Remove(newLink))
{
textBox1.Text = "The DocumentLink 'newlink' could be Removed! " + Environment.NewLine + Environment.NewLine";
}
Dim newLink As TXTextControl.DocumentLink = New TXTextControl.DocumentLink("Jump to page 1", newTarget)
If textControl1.DocumentLinks.Remove(newLink) Then
textBox1.Text = "The DocumentLink 'newlink' could be Removed! " & Environment.NewLine + Environment.NewLine
End If