0% found this document useful (0 votes)
47 views2 pages

LHLKHLKHKL JHGJHGSDGSDGJHGJHG QFQFQFQF Dfljsdgsdglkasdl Asfasf Wegsdgsdgsdfg SDGSDGSDG

The document discusses how to add various common GUI widgets to a Tkinter application in Python. It provides code snippets and explanations for how to include labels, buttons, text entry boxes, drop-down menus, checkboxes, radio buttons, text areas, message boxes, spin boxes, progress bars, file selection dialogs, menus, tabs, and spacing/padding between widgets. The document serves as a tutorial for building graphical user interfaces using the Tkinter module in Python.

Uploaded by

SGB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

LHLKHLKHKL JHGJHGSDGSDGJHGJHG QFQFQFQF Dfljsdgsdglkasdl Asfasf Wegsdgsdgsdfg SDGSDGSDG

The document discusses how to add various common GUI widgets to a Tkinter application in Python. It provides code snippets and explanations for how to include labels, buttons, text entry boxes, drop-down menus, checkboxes, radio buttons, text areas, message boxes, spin boxes, progress bars, file selection dialogs, menus, tabs, and spacing/padding between widgets. The document serves as a tutorial for building graphical user interfaces using the Tkinter module in Python.

Uploaded by

SGB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

lhlkhlkhkl

jhgjhgsdgsdgjhgjhg

qfqfqfqf

Dfljsdgsdglkasdl

asfasf

wegsdgsdgsdfg

sdgsdgsdg

Table of Contents [hide]


 1 Create your first GUI application
 2 Create a label widget
o 2.1 Set label font size
o 2.2 Setting window size
 3 Adding a button widget
o 3.1 Change button foreground and background
colors
o 3.2 Handle button click event
 4 Get input using Entry class (Tkinter textbox)
o 4.1 Set focus to entry widget
o 4.2 Disable entry widget
 5 Add a combobox widget
 6 Add a Checkbutton widget (Tkinter checkbox)
o 6.1 Set check state of a Checkbutton
 7 Add radio buttons widgets
o 7.1 Get radio button value (selected radio
button)
 8 Add a ScrolledText widget (Tkinter textarea)
o 8.1 Set scrolledtext content
o 8.2 Delete/Clear scrolledtext content
 9 Create a MessageBox
o 9.1 Show warning and error messages
o 9.2 Show askquestion dialogs
 10 Add a SpinBox (numbers widget)
o 10.1 Set default value for Spinbox
 11 Add a Progressbar widget
o 11.1 Change Progressbar color
 12 Add a filedialog (file & directory chooser)
o 12.1 Specify file types (filter file extensions)
 13 Add a Menu bar
 14 Add a Notebook widget (tab control)
o 14.1 Add widgets to Notebooks
 15 Add spacing for widgets (padding)

se the progressbar class like this:

1 from tkinter.ttk import Progressbar


2
3 bar = Progressbar(window, length=200)
You can set the progress bar value like this:

bar['value'] = 70
You can set this value based on any process you want like downloading
a file or completing a task.

kgjkjgkgkjgk

You might also like