| C1.Win.C1InputPanel.4 Assembly > C1.Win.C1InputPanel Namespace > InputHtmlLabel Class : LinkClicked Event |
'Declaration Public Event LinkClicked As LinkClickedEventHandler
public event LinkClickedEventHandler LinkClicked
The event handler receives an argument of type LinkClickedEventArgs containing data related to this event. The following LinkClickedEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Button | Gets the button that was clicked on the link. |
| HRef | Gets the value of the link's HREF attribute. |
| Location | Get the location of the mouse during the generating event. |
| Target | Gets the value of the link's TARGET attribute. |
| X | Get the x-coordinate of the mouse during the generating event. |
| Y | Get the y-coordinate of the mouse during the generating event. |
// configure InputHtmlLabel inputHtmlLabel1.Text = "click <a href='about'><b>HERE</b></a> to see an about box.<br>" + "or click <a href='time'><b>HERE</b></a> to see the current time."; // attach event handler inputHtmlLabel1.LinkClicked += new LinkClickedEventHandler(inputHtmlLabel1_LinkClicked); // ... void inputHtmlLabel1_LinkClicked(object sender, LinkClickedEventArgs e) { if (e.Button == MouseButtons.Left) { if (e.HRef == "about") { MessageBox.Show("About clicked!"); } else if (e.HRef == "time") { MessageBox.Show("The time is " + DateTime.Now.ToShortTimeString()); } } }