Class ExLabel
- Namespace
- ExControls
- Assembly
- ExControls.dll
Extended Label control: a disabled label draws its text in DisabledForeColor instead of the system gray.
[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExLabel.ico")]
public class ExLabel : Label, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IAutomationLiveRegion, IThemeable
- Inheritance
-
ExLabel
- Implements
- Inherited Members
- Extension Methods
Constructors
ExLabel()
Initializes a new instance of the ExLabel class.
public ExLabel()
Properties
DisabledForeColor
Color of the Label's text when the Control is disabled
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Color of the CheckBox's text and box when the Control is disabled.")]
public Color DisabledForeColor { get; set; }
Property Value
Methods
ApplyTheme(ExTheme)
Sets the text color by the theme (LabelForeColor, also in the system style) and in the custom style DisabledForeColor faded from it towards the panel background.
public void ApplyTheme(ExTheme theme)
Parameters
themeExThemetheme to apply
OnDisabledForeColorChanged()
Raises the DisabledForeColorChanged event.
protected virtual void OnDisabledForeColorChanged()
OnPaint(PaintEventArgs)
Raises the Paint event.
protected override void OnPaint(PaintEventArgs e)
Parameters
ePaintEventArgsA PaintEventArgs that contains the event data.
Remarks
An enabled label is drawn by Label. A disabled text has DisabledForeColor instead of the system color, otherwise it is drawn the same way as in Label (alignment, wrapping, padding, mnemonics, ellipsis) so that it matches the size from GetPreferredSize(Size). A disabled label does not raise the Paint event.
Events
DisabledForeColorChanged
Occurs when the DisabledForeColor property changes.
[ExCategory("Changed Property")]
[ExDescription("Occurs when the DisabledForeColor property changes.")]
public event EventHandler? DisabledForeColorChanged