上一话题

shlex — 简单的词法分析

下一话题
就业培训     下载中心     Wiki     联络
登录   注册

Log
  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 采用 Tk 的图形用户界面

采用 Tk 的图形用户界面 ¶

Tk/Tcl has long been an integral part of Python. It provides a robust and platform independent windowing toolkit, that is available to Python programmers using the tkinter package, and its extension, the tkinter.tix 和 tkinter.ttk 模块。

The tkinter package is a thin object-oriented layer on top of Tcl/Tk. To use tkinter , you don’t need to write Tcl code, but you will need to consult the Tk documentation, and occasionally the Tcl documentation. tkinter is a set of wrappers that implement the Tk widgets as Python classes.

tkinter ’s chief virtues are that it is fast, and that it usually comes bundled with Python. Although its standard documentation is weak, good material is available, which includes: references, tutorials, a book and others. tkinter is also famous for having an outdated look and feel, which has been vastly improved in Tk 8.5. Nevertheless, there are many other GUI libraries that you could be interested in. The Python wiki lists several alternative GUI frameworks and tools .

  • tkinter — 到 Tcl/Tk 的 Python 接口
    • 体系结构
    • Tkinter Modules
    • Tkinter Life Preserver
      • A Hello World Program
      • Important Tk Concepts
      • Understanding How Tkinter Wraps Tcl/Tk
      • How do I…? What option does…?
      • Navigating the Tcl/Tk Reference Manual
    • Threading model
    • Handy Reference
      • 设置选项
      • The Packer
      • Packer Options
      • Coupling Widget Variables
      • The Window Manager
      • Tk Option Data Types
      • Bindings and Events
      • The index Parameter
      • 图像
    • File Handlers
  • tkinter.colorchooser — 颜色选取对话框
  • tkinter.font — Tkinter 字体包裹器
  • Tkinter 对话框
    • tkinter.simpledialog — Standard Tkinter input dialogs
    • tkinter.filedialog — File selection dialogs
      • Native Load/Save Dialogs
    • tkinter.commondialog — Dialog window templates
  • tkinter.messagebox — Tkinter 消息提示
  • tkinter.scrolledtext — 卷动文本 Widget
  • tkinter.dnd — 拖放支持
  • tkinter.ttk — Tk 主题 Widget
    • Using Ttk
    • Ttk Widgets
    • Widget
      • Standard Options
      • Scrollable Widget Options
      • Label Options
      • Compatibility Options
      • Widget States
      • ttk.Widget
    • Combobox
      • Options
      • Virtual events
      • ttk.Combobox
    • Spinbox
      • Options
      • Virtual events
      • ttk.Spinbox
    • Notebook
      • Options
      • Tab Options
      • Tab Identifiers
      • Virtual Events
      • ttk.Notebook
    • Progressbar
      • Options
      • ttk.Progressbar
    • Separator
      • Options
    • Sizegrip
      • Platform-specific notes
      • Bugs
    • Treeview
      • Options
      • Item Options
      • Tag Options
      • Column Identifiers
      • Virtual Events
      • ttk.Treeview
    • Ttk Styling
      • 布局
  • tkinter.tix — 用于 Tk 的扩展 Widget
    • Using Tix
    • Tix Widgets
      • Basic Widgets
      • File Selectors
      • Hierarchical ListBox
      • Tabular ListBox
      • Manager Widgets
      • Image Types
      • Miscellaneous Widgets
      • Form Geometry Manager
    • Tix Commands
  • IDLE
    • 菜单
      • File menu (Shell and Editor)
      • Edit menu (Shell and Editor)
      • Format menu (Editor window only)
      • Run menu (Editor window only)
      • Shell menu (Shell window only)
      • Debug menu (Shell window only)
      • Options menu (Shell and Editor)
      • Window menu (Shell and Editor)
      • Help menu (Shell and Editor)
      • Context menus
    • Editing and Navigation
      • Editor windows
      • Key bindings
      • Automatic indentation
      • 搜索和替换
      • Completions
      • Calltips
      • Code Context
      • Shell window
      • Text colors
    • Startup and Code Execution
      • 命令行用法
      • Startup failure
      • Running user code
      • User output in Shell
      • Developing tkinter applications
      • Running without a subprocess
    • Help and Preferences
      • Help sources
      • Setting preferences
      • IDLE on macOS
      • 扩展
    • idlelib

上一话题

shlex — 简单的词法分析

下一话题

tkinter — 到 Tcl/Tk 的 Python 接口

本页

  • 报告 Bug
  • 展示源

快速搜索

键入搜索术语或模块、类、函数名称。

  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 采用 Tk 的图形用户界面

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1