Class GenericLabel
Implements generic label control.
public class GenericLabel : GraphicControl, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo
- Inheritance
-
GenericLabel
- Implements
Constructors
- GenericLabel()
Initializes a new instance of the GenericLabel class.
- GenericLabel(Control)
Initializes a new instance of the GenericLabel class.
- GenericLabel(string?)
Initializes a new instance of the GenericLabel class.
Properties
- DisabledImage
Gets or sets the disabled image that is displayed near the text.
- Image
Gets or sets the image that is displayed near the text.
- ImageVisible
Gets or sets a value indicating whether to draw image.
- MnemonicCharIndex
Gets or sets underlined character index.
- Padding
Gets or sets the padding inside a control.
- TextAlignment
Gets or sets alignment of the text.
- TextAlignmentHorizontal
Gets or sets vertical alignment of the text.
- TextAlignmentVertical
Gets or sets vertical alignment of the text.
- TextFormat
Gets or sets text format.
- TextPrefix
Gets or sets text prefix.
- TextSuffix
Gets or sets text suffix.
Methods
- DefaultPaint(PaintEventArgs)
Default painting method of the UserControl and its descendants.
- DrawDefaultText(Graphics, RectD, Color?, Color?, Font?)
Draws text in the default style.
- GetFormattedText()
Gets formatted text with TextSuffix and TextPrefix.
- GetImage(VisualControlState)
Gets image for the specified control state.
- GetMnemonicCharIndex()
Gets mnemonic char index from MnemonicCharIndex or -1.
- GetPreferredSize(SizeD)
Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.
- MakeAsLinkLabel()
Changes visual style of the control to look like LinkLabel.
- OnImageChanged(EventArgs)
Called when the value of the Image property changes.
- OnTextChanged(EventArgs)
Called when the TextChanged event is raised.
- RaiseImageChanged(EventArgs)
Raises the ImageChanged event and calls OnImageChanged(EventArgs).
Events
- ImageChanged
Occurs when the Image property changes.