DekGenius.com
[ Team LiB ] Previous Section Next Section

LinkLabelmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

This Control, derived from Label, adds the ability to insert one or more hyperlinks in the control Text.

By default, the whole text is assigned to a single link. To specify a range of text that constitutes the link (instead of the entire text), you can assign a LinkArea value to the LinkArea property. You can determine whether the link has been clicked through the LinkVisited property.

If you wish to create several links within the text, you can add items to the Links collection. You need to Clear() the collection first to get rid of the default link, then create new Link instances to Add() to the collection.

See Link for more information on the class.

public class LinkLabel : Label : IButtonControl {
// Public Constructors
   public LinkLabel();
// Public Instance Properties
   public Color ActiveLinkColor{set; get; }
   public Color DisabledLinkColor{set; get; }
   public LinkArea LinkArea{set; get; }
   public LinkBehavior LinkBehavior{set; get; }
   public Color LinkColor{set; get; }
   public LinkCollection Links{get; }
   public bool LinkVisited{set; get; }
   public override string Text{set; get; }
// overrides Control
   public Color VisitedLinkColor{set; get; }
// Protected Instance Properties
   protected Cursor OverrideCursor{set; get; }
// Protected Instance Methods
   protected override AccessibleObject CreateAccessibilityInstance();  // overrides Label
   protected override void CreateHandle();  // overrides Control
   protected override void OnEnabledChanged(EventArgs e);  // overrides Label
   protected override void OnFontChanged(EventArgs e);  // overrides Label
   protected override void OnGotFocus(EventArgs e);  // overrides Control
   protected override void OnKeyDown(KeyEventArgs e);  // overrides Control
   protected virtual void OnLinkClicked(LinkLabelLinkClickedEventArgs e);
   protected override void OnLostFocus(EventArgs e);  // overrides Control
   protected override void OnMouseDown(MouseEventArgs e);  // overrides Control
   protected override void OnMouseLeave(EventArgs e);  // overrides Control
   protected override void OnMouseMove(MouseEventArgs e);  // overrides Control
   protected override void OnMouseUp(MouseEventArgs e);  // overrides Control
   protected override void OnPaint(PaintEventArgs e);  // overrides Label
   protected override void OnPaintBackground(PaintEventArgs e);  // overrides Control
   protected override void OnTextAlignChanged(EventArgs e);  // overrides Label
   protected override void OnTextChanged(EventArgs e);  // overrides Label
   protected Link PointInLink(int x, int y);
   protected override bool ProcessDialogKey(Keys keyData);  // overrides Control
   protected override void Select(bool directed, bool forward);  // overrides Control
   protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified);  // overrides Label
   protected override void WndProc(ref Message msg);  // overrides Label
// Events
   public event LinkLabelLinkClickedEventHandler LinkClicked;
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) Label LinkLabel(IButtonControl)

Passed To

LinkCollection.LinkCollection()

    [ Team LiB ] Previous Section Next Section