- Pyroom
- Tutorials
- Python Tkinter
- Make a Tkinter window with a button
Make a Tkinter window with a button
Tkinter builds real windows with buttons and text. In Pyroom the window appears in the preview panel.
Beginner Video coming soon. The steps below show everything the video will cover.
Steps
- Import tkinter, create a window and a button. command says which function runs on click.
- Run it. The window opens in the preview panel.
- Click the button. The function runs and prints to the console.
Read the transcript
Import tkinter, create a window and a button. command says which function runs on click.
Run it. The window opens in the preview panel.
Click the button. The function runs and prints to the console.
More Python Tkinter tutorials
- Build a Tkinter form with Entry and Label · Intermediate
- Make a Tkinter Canvas mini-game · Advanced