windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemcheckedit.md
Occurs when a hyperlink within the current RepositoryItemCheckEdit control’s caption is clicked.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event HyperlinkClickEventHandler HyperlinkClick
<DXCategory("Events")>
Public Event HyperlinkClick As HyperlinkClickEventHandler
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. |
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.
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);
}
Private checkEdit1.Text = "Visit the <href=www.devexpress.com>DevExpress Web Site</href>"
. . .
Private Sub checkEdit1_Properties_HyperlinkClick(ByVal sender As Object, ByVal e As HyperlinkClickEventArgs)
System.Diagnostics.Process.Start(e.Link)
End Sub
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