Label (lbl)

microsoft excel docsLabel - Allows you to display text to the user.


microsoft excel docs

AutoSize if True by default.

Doesn't Accept Ampersand (&)

A single ampersand is not displayed. You must use a double ampersand.
Alternatively you could use the "UseMnemonice" property
Group Box also does not display single ampersand

Useful Code

Label1.Text = "some text" 


AutoEllipsis Gets or sets a value indicating whether the ellipsis character (...) appears at the right edge of the Label, denoting that the Label text extends beyond the specified length of the Label.
AutoSizeOverridden. Gets or sets a value indicating whether the control is automatically resized to display its entire contents.
BorderStyleGets or sets the border style for the control.
DefaultSize Overridden.
FlatStyleGets or sets the flat style appearance of the label control.
ImageGets or sets the image that is displayed on a Label.
ImageAlignGets or sets the alignment of an image that is displayed in the control.
ImageIndexGets or sets the index value of the image displayed on the Label.
ImageKeyGets or sets the key accessor for the image in the ImageList.
ImageListGets or sets the ImageList that contains the images to display in the Label control.
PreferredHeight Gets the preferred height of the control.
PreferredWidth Gets the preferred width of the control.
RenderTransparent Indicates whether the container control background is rendered on the Label.
TextAlignGets or sets the alignment of text in the label.
UseCompatibleTextRendering Gets or sets a value that specifies whether text rendering should be compatible with previous releases of Windows Forms.
UseMnemonicGets or sets a value indicating whether the control interprets an ampersand character (&) in the control's Text property to be an access key prefix character.


Dispose Overloaded. Releases the resources used by the Label.
GetPreferredSize Overridden.
CalcImageRenderBounds Determines the size and location of an image drawn within the Label control based on the alignment of the control.
DrawImage Draws an Image within the specified bounds.


AutoSizeChanged Occurs when the value of the AutoSize property changes.
BackgroundImageChanged Occurs when the BackgroundImage property changes.
BackgroundImageLayoutChanged Occurs when the BackgroundImageLayout property changes.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext