Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications.
For most widgets , tkinter syntax is as follows:
window = Tk()
widget = Tk.Widget(parent_window,text=...,command=...,width=...,height=...)
window.mainloop() '''mainloop() is an infinite loop used to run the application,
wait for an event to occur and process the event till the window is not closed'''
- Button
- Canvas
- Checkbutton
- Entry
- Frame
- Label
- Listbox
- Menubutton
- Menu
- Message
- Radiobutton
- Scale
- Scrollbar
- Text
- Toplevel
- Spinbox
- PanedWindow
- LabelFrame
- tkMessageBox
Let us look at how some of the common attributes, such as sizes, colors and fonts are specified.
- Dimensions
- Colors
- Fonts
- Anchors
- Relief styles
- Bitmaps
- Cursors