C1.Win.SuperTooltip Namespace / C1SuperLabelBase Class / LinkClicked Event
Example

LinkClicked Event (C1SuperLabelBase)
Event that fires when the user clicks a hyperlink within a C1SuperLabelBase control.
Syntax
'Declaration
 
Public Event LinkClicked As C1SuperLabelLinkClickedEventHandler
 
Event Data

The event handler receives an argument of type C1SuperLabelLinkClickedEventArgs containing data related to this event. The following C1SuperLabelLinkClickedEventArgs properties provide information specific to this event.

PropertyDescription
Gets the button that was clicked on the link.  
Gets the value of the link's HREF attribute.  
Gets the value of the link's TARGET attribute.  
Remarks
Hyperlinks are created using "A" tags in the HTML source text. When hyperlinks are clicked, the LinkClicked event fires and provides information about the link. The event handler can then take appropriate action.
Example
The example below creates some hyperlinks using "A" tags. When the user clicks the link, the event handler shows a message box.
// configure c1superLabel
c1superLabel.AutoSize = true;
c1superLabel.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
c1superLabel.LinkClicked += new C1SuperLabelLinkClickedEventHandler(c1superLabel_LinkClicked);
// ...
            
void c1superLabel_LinkClicked(object sender, C1SuperLabelLinkClickedEventArgs e)
{
  if (e.HRef == "about")
  {
    MessageBox.Show("About C1SuperLabel!");
  }
  else if (e.HRef == "time")
  {
    MessageBox.Show("The time is " + DateTime.Now.ToShortTimeString());
  }
}
See Also