Button
This widget features a variety of button style types that have a primary color by default, or the selected color.
This widget supports a special style for disabled state.
Solid button (default)
The default style features a solid background that lightens on hover and darkens when pressed. A dashed ring appears inside the button when the widget has focus.
# default style
Button()
# success style
Button(bootstyle="success")
Outline button
This style features a thin styled outline. When pressed or on hover, the button changes to a solid color similar to the default button style. A dashed ring appears inside the button when the widget has focus.
# default outline style
Button(bootstyle="outline")
# success outline style
Button(bootstyle="success-outline")
Link button
This style features a button with the appearance of a label. The text color changes to info on hover or when pressed to simulate the effect you would expect on an HTML hyperlink. There is a slight shift-relief when the button is pressed that gives the appearance of movement. A dashed ring appears inside the button when the widget has focus.
# default link style
Button(bootstyle="link")
# success link style
Button(bootstyle="success-link")
Other button styles
Disabled button
This style cannot be applied via keywords; it is configured through widget settings.
# create the button in a disabled state
Button(state="disabled")
# disable a button after creation
b = Button()
b.configure(state="disabled")