TXTextControl.HyperlinkDialog Class

The HyperlinkDialog class implements a Windows Forms dialog box for inserting and editing a hyperlink at the current text input position. The dialog box inserts either a HypertextLink to an external location or a DocumentLink to a location in the same document. If there is such a link at the current input position, the data of the link is shown and can be edited. Furthermore the hyperlink at the current input position can be deleted. The dialog box can only be opened, if either HypertextLinkCollection.CanAdd returns true or if DocumentLinkCollection.GetItem() or HypertextLinkCollection.GetItem() does not return null. Otherwise, an exception occurs. Each item of the dialog box has a name, available through its Name property, which corresponds with a member of the HyperlinkDialog.DialogItem enumeration. The HyperlinkDialog.FindItem method can be used to get a certain item and manipulate, move or delete it. The HyperlinkDialog is a modal dialog box which must be shown with the HyperlinkDialog.ShowDialog method.

Introduced: 23.0.

Syntax

[C#]
public class HyperlinkDialog : System.Windows.Forms.Form
[Visual Basic]
Public Class HyperlinkDialog
  Inherits System.Windows.Forms.Form

Constructors

Constructor Description
HyperlinkDialog Creates a HyperlinkDialog object for the specified Windows Forms TextControl.

Methods

Method Description
FindItem Finds a control that has the provided identifier name.

Enumerations

Enumeration Description
DialogItem Each DialogItem represents an item in a HyperlinkDialog dialog box.

Example

The following example creates an HyperlinkDialog object and shows the dialog box:

[C#]
HyperlinkDialog dlg = new HyperlinkDialog(textControl1);
dlg.ShowDialog();
[Visual Basic]
Dim dlg As New HyperlinkDialog(textControl1)
dlg.ShowDialog()

See Also