🪟

Tkinter Toplevel 窗口

使用 Tkinter 的 Toplevel 创建和管理子窗口的实用指南。创建基本、模态、定位和临时窗口,并安全地清理资源。

gui tkinter

Tutorial Progress

Step 1 of 7

1 Video Tutorial and What You Will Build

This guide shows how to create and manage Toplevel windows with Tkinter. You will make a main window that launches four child windows—basic, modal, positioned, and transient—so you can see how control, focus, and layering actually work.

Goal: Launch windows on demand, decide when they are modal, control their positions, and safely clean up when they close.