

If nonnegative, the corresponding text character will be underlined.

Default is NORMAL.ĭefault is -1, meaning that no character of the text on the button will be underlined. Has the value ACTIVE when the mouse is over it. Set this option to DISABLED to gray out the button and make it unresponsive. Some of the values are SUNKEN, RAISED, GROOVE, and RIDGE.
THONNY FOR TINKERBOARD HOW TO
How to show multiple text lines: LEFT to left-justify each line CENTER to center them or RIGHT to right-justify.Īdditional padding left and right of the text.Īdditional padding above and below the text. Image to be displayed on the button (instead of text). The color of the focus highlight when the widget has focus. Height of the button in text lines (for textual buttons) or pixels (for images). Text font to be used for the button's label.

These options can be used as key-value pairs separated by commas.īackground color when the button is under the cursor.įoreground color when the button is under the cursor.įunction or method to be called when the button is clicked. Options − Here is the list of most commonly used options for this widget. Master − This represents the parent window. Here is the simple syntax to create this widget − You can attach a function or a method to a button which is called automatically when you click the button. These buttons can display text or images that convey the purpose of the buttons. The Button widget is used to add buttons in a Python application.
