跳转至

Label

This widget features two style types that can both be customized using any of the available colors.

Default label

The default style features a default theme defined foreground and background color. The foreground can be changed using a selected color.

normal label

# default label style
Label()

# danger colored label style
Label(bootstyle="danger")

Inverse label

This style features a label with colors that are inverted versions of the default colors. The selected color changes the background color instead of the foreground color.

This is especially useful when you are adding labels to a styled Frame, or you want to add a label heading that does not have a default background color.

inverse label

# default inverse label style
Label(bootstyle="inverse")

# danger colored inverse label style
Label(bootstyle="inverse-danger")