TkLabel#
TkLabel is tkinter’s classic tk.Label, themed by ttkbootstrap and
re-exported as ttk.TkLabel. It displays a line or block of read-only text,
an image, or both. Prefer the ttk Label for themed text;
reach for TkLabel only when you need a classic-tk option the ttk label
doesn’t expose (a per-widget background/foreground, bitmap,
activeforeground, disabledforeground).
Options#
Option |
Type |
Description |
|---|---|---|
|
|
Constructor only. |
|
|
The string to display. |
|
|
A |
|
|
An image to display in place of, or beside, the text. |
|
|
A built-in bitmap to display instead of an image. |
|
|
How text and image are combined: |
|
|
The character index to underline (for a keyboard mnemonic), or |
|
|
The font for the text. |
|
|
The text color. |
|
|
The surface color. |
|
|
The text color while the label is active (e.g. under the pointer in a menu). |
|
|
The surface color while the label is active. |
|
|
The text color when |
|
|
Alignment of multi-line text: |
|
|
Where the content sits within any extra space: |
|
|
The width, in pixels, at which text wraps to a new line ( |
|
|
The requested width in characters ( |
|
|
The requested height in lines ( |
|
|
Internal horizontal padding around the content, in pixels. |
|
|
Internal vertical padding around the content, in pixels. |
|
|
The 3-D border width in pixels. |
|
|
The border style: |
|
|
The width of the focus highlight around the widget. |
|
|
The focus-highlight color when the widget has focus. |
|
|
The focus-highlight color when the widget does not have focus. |
|
|
|
|
|
The mouse cursor (see Cursors). |
|
|
Whether the label accepts keyboard focus during traversal. |
See also#
Label — the themed ttk label (preferred).
Tk label manual page — the canonical upstream reference (Tcl 8.6).