Note the following few important features that are common to all widgets:
- All widgets are actually objects derived from their respective widget classes. So, a statement such as button = Button(its_parent) actually creates a button instance from the Button class.
- Each widget has a set of options that decides its behavior and appearance. This includes attributes such as text labels, colors, and font size. For example, the Button widget has attributes to manage its label, control its size, change its foreground and background colors, change the size of the border, and more.
- To set these attributes, you can set the values directly at the time of creating the widget, as demonstrated in the preceding example. Alternatively, ...