C# Class Nexus.UI.Controls.AutosizeLabel.RichTextLabel

A RichTextBox that is styled to behave like a label.
Inheritance: System.Windows.Forms.RichTextBox
Show file Open project: NexusMods/NexusModManager-4.5

Private Properties

Property Type Description

Public Methods

Method Description
AutosizeLabel_Enter ( object sender, EventArgs e ) : void

Handles the Control.Enter event of the autosize label.

This gives the hidden scrollable panel focus instead of the label, so that the user can't select any text.

RichTextLabel ( ) : System

The default constructor.

Protected Methods

Method Description
OnContentsResized ( System.Windows.Forms.ContentsResizedEventArgs e ) : void

Resizes the label as the content size changes.

OnLinkClicked ( System.Windows.Forms.LinkClickedEventArgs e ) : void

Raises the RichTextBox.LinkClicked event.

This ask the OS to launch the clicked link.

OnTextChanged ( EventArgs e ) : void

Makes sure all text doesn't look disabled.

SetTextColor ( ) : void

Forces the text color not to look disabled.

Method Details

AutosizeLabel_Enter() public method

Handles the Control.Enter event of the autosize label.
This gives the hidden scrollable panel focus instead of the label, so that the user can't select any text.
public AutosizeLabel_Enter ( object sender, EventArgs e ) : void
sender object The object that raised the event.
e System.EventArgs An describing the event arguments.
return void

OnContentsResized() protected method

Resizes the label as the content size changes.
protected OnContentsResized ( System.Windows.Forms.ContentsResizedEventArgs e ) : void
e System.Windows.Forms.ContentsResizedEventArgs A describing the event arguments.
return void

OnLinkClicked() protected method

Raises the RichTextBox.LinkClicked event.
This ask the OS to launch the clicked link.
protected OnLinkClicked ( System.Windows.Forms.LinkClickedEventArgs e ) : void
e System.Windows.Forms.LinkClickedEventArgs A describing the event arguments.
return void

OnTextChanged() protected method

Makes sure all text doesn't look disabled.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs A describing the event arguments.
return void

RichTextLabel() public method

The default constructor.
public RichTextLabel ( ) : System
return System

SetTextColor() protected method

Forces the text color not to look disabled.
protected SetTextColor ( ) : void
return void