Use to show a static text or image to the user, whether identifying some other user interface element
(e.g. "Name" next to an entry), something purely decorative, or presenting a result. Users normally
do not interact with labels.
Widget Essentials
Python:
lbl = ttk.Label(parent, text="Name:")
Tcl:
ttk::label.lbl -text "Name:"
Ruby:
lbl = Tk::Tile::Label.new(parent) {text "Name:"}
Perl:
my $lbl = parent->new_ttk__label(-text => "Name:");
As an alternative to text, get the string from a variable, updating when the variable changes.
image, compound
Specify a Tk Image object (not the path to an image file) instead of the text string.
If compound is center, top, bottom, left, or right, display the text and the image.
justify
Alignment of text: left, center or right.
wraplength
For multi-line labels; let Tk calculate the line breaks rather than explicitly embedding newlines in the text string.