Skip to main content

RepositoryItemCheckEdit.HyperlinkClick Event

Occurs when a hyperlink within the current RepositoryItemCheckEdit control’s caption is clicked.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DXCategory("Events")]
public event HyperlinkClickEventHandler HyperlinkClick

Event Data

The HyperlinkClick event's data class is HyperlinkClickEventArgs. The following properties provide information specific to this event:

Property Description
Link Get or sets the URL of the clicked hyperlink.
MouseArgs Gets or sets mouse coordinates calculated from the toolbar’s upper left corner.
Text Gets or sets the hyperlink alt text. Note that modifying this text does not change the item caption.

Remarks

If you use HTML Text Formatting to format your CheckEdit control’s caption, you can display the desired string as a hyperlink. To do so, use the <href></href> tag. The figure below illustrates the example.

CheckEdit - Hyperlink

To enable HTML text formatting, set the RepositoryItem.AllowHtmlDraw property to DefaultBoolean.True.

When an end-user clicks such a hyperlink, the HyperlinkClick event fires. Handle it to perform required actions. For example, the following code starts a default browser to display the web page, stored within the hyperlink.

checkEdit1.Text = "Visit the <href=www.devexpress.com>DevExpress Web Site</href>";
. . .
private void checkEdit1_Properties_HyperlinkClick(object sender, HyperlinkClickEventArgs e) {
    System.Diagnostics.Process.Start(e.Link);
}

Clicking a hyperlink within a CheckEdit control does not affect its checked state and vice versa, and checking or unchecking a CheckEdit does not trigger the HyperlinkClick event.

See Also