We've discussed link labels in the In Depth section of this chapter-they are those labels that support hyperlinks (the LinkLabel class is derived from the Label class). Take a look at Table 5.12 to see the notable properties of the LinkLabel class, and Table 5.13 to see its notable events. These tables do not include all the notable properties, methods, and events this class inherits from the Control class-you'll find them in Tables 5.1, 5.2, and 5.3; nor do they include all the notable properties it inherits from the Label class-see Table 5.11 for those.
Property |
Means |
---|---|
ActiveLinkColor |
Sets/gets the color for an active link. |
DisabledLinkColor |
Sets/gets the color for a disabled link. |
LinkArea |
Sets/gets the range in the text to treat as a link. |
LinkBehavior |
Sets/gets a value that represents the behavior of a link. |
LinkColor |
Sets/gets the color for a normal link. |
Links |
Gets the collection of links in the LinkLabel control. |
LinkVisited |
Sets/gets a value specifying if a link should be displayed as though it had been visited. |
VisitedLinkColor |
Sets/gets the color used for links that that have been visited. |
Event |
Means |
---|---|
LinkClicked |
Occurs when a link is clicked inside the link label. |
Tip |
Now you can even use a RichTextBox for Web-style links by setting the DetectUrls property to True and writing code to handle the LinkClicked event. |