[PYTHON] Basic usage of PySimple GUI

● Text body (PDF format 41 pages: 1.22MB) Updated on 2020/03/12 (→ DL from mirror site) ---------------------

(2020/03/12) I teach programming at school. I made a text of PySimpleGUI for use in the educational field.

There are many GUI libraries for Python, but PySimpleGUI is probably the easiest for beginners. There is also a sense of security that it is based on Tkinter.

This text is still incomplete, but we will correct and update the content if you use it in the field of education. We will publish it for free, so we would be grateful if you could give us your opinion. If you find any mistakes, please let us know. We will fix it immediately. (Contact information is on the back cover of the text)

Introduction page Sample programs and materials in the text are also available here.   Those who want to use this are welcome. I would like to improve the degree of perfection while receiving opinions. Especially, I hope it will be used by teachers who teach programming at school. We would appreciate it if you could give us any requests or suggestions from the field. (Reflect in the text as much as possible)

This book is limited to the contents related to PySimple GUI. For the Python language, Distribute the text here.


table of contents

1 Introduction --- 1 2 Introduction --- 1 2.1 Outline of usage --- 1 2.1.1 Widget placement --- 1 2.1.2 Event loop --- 2 2.1.3 Termination of GUI program --- 2 2.1.4 Explanation along with the sample --- 2 2.1.4.1 Widget size setting --- 3 2.1.4.2 Design theme setting --- 3 2.1.4.3 Enabling event handling for widgets --- 4 2.1.4.4 Giving a name to the widget --- 4 2.1.4.5 Access to existing widgets --- 5 3 Widgets --- 6 3.1 Character string, image display --- 6     3.1.1 Text --- 6  3.1.1.1 Fonts that can be used --- 6 3.1.1.2 Margins and frames --- 7     3.1.2 Image --- 8  3.2 Character input --- 9     3.2.1 InputText --- 9  3.2.1.1 Correspondence of events, values, and widgets --- 10 3.2.1.2 Registration of event handling in InputText --- 10 3.2.1.3 Password input field --- 11 3.2.1.4 Setting the value to InputText --- 11     3.2.2 Multiline --- 12  3.3 Buttons --- 13     3.3.1 Button --- 13      3.3.2 Checkbox --- 15      3.3.3 Radio --- 15  3.4 Selective input --- 16     3.4.1 Listbox --- 16      3.4.2 Spin --- 17      3.4.3 Slider --- 18  3.4.3.1 Setting the value to Slider --- 18 3.5 Frame, separator line --- 19     3.5.1 Frame --- 19      3.5.2 VerticalSeparator --- 21  3.6 Progress bar --- 21 3.7 Table, tree --- 22     3.7.1 Table --- 22      3.7.2 Tree --- 23  3.8 Various display structures --- 24     3.8.1 Tab,TabGroup --- 24      3.8.2 Pane,Column --- 25  3.9 Menu --- 27     3.9.1 OptionMenu --- 27      3.9.2 MenuBar --- 28      3.9.3 ButtonMenu --- 29  4 Pop-up window --- 30 4.1 Input --- 30     4.1.1 PopupGetText --- 30  4.2 Pop-up display for reporting and confirmation --- 31 5 Window settings --- 33 5.1 Window size setting --- 33 5.2 Theme setting --- 33 5.2.1 List display of design themes --- 33 5.2.2 Survey of design themes that can be used --- 34 5.3 Presence or absence of title bar --- 34 5.3.1 Window transparency --- 35


Related Links

● If you use Tkinter, try using PySimpleGUI ● I rewrote the GUI part of "Making a drawing quiz with Kivy + PyTorch" with PySimpleGUI ● Draw a graph with PySimple GUI ● Create a UI that replaces VBA with PySimpleGUI (file dialog, list, log output)

Recommended Posts

Basic usage of PySimple GUI
Basic usage of flask-classy
Basic usage of Jinja2
Basic usage of SQLAlchemy
Super basic usage of pytest
Basic usage of Pandas Summary
Basic usage of Python f-string
Basic usage of Btrfs on Arch Linux
[Introduction to Python] Basic usage of lambda expressions
Basic operation of pandas
Summary of pyenv usage
Usage of Python locals ()
Basic operation of Pandas
Basic knowledge of Python
Basic processing of librosa
Make a note of the list of basic Pandas usage
(Beginner) Basic usage of Datastore on Google App Engine
[Introduction to Python] Basic usage of the library matplotlib
Convenient usage summary of Flask
Basic flow of anomaly detection
virtualenv Basic command usage memo
(Minimal) usage of django logger
XPath Basics (1) -Basic Concept of XPath
Sample usage of Python pickle
One-liner basic graph of HoloViews
[Python] Correct usage of join
Index of certain pandas usage
[2020/06 latest version] Basic usage of python dependency management tool poetry
[Python] Basic pattern and usage of if statement (comparison operator and Boolean operator)
Summary of basic knowledge of PyPy Part 1
Summary of basic implementation by PyTorch
Easy usage memo of Anaconda (conda)
About the basic type of Go
Installation and easy usage of pytest
Basic grammar of Python3 system (dictionary)
[python] Correct usage of if statement
Draw a graph with PySimple GUI
Basic study of OpenCV with Python