Tin mới
Graphical user interfaces with Tk
tkinter.colorchooser — Color choosing dialog
tkinter.ttk: Tk themed widget set
Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface components along with a new API to use them (see tkinter.ttk). Both old and new APIs are still available. Most documentation you will find online still u
Requirements for optional modules
The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including macOS, as well as on Windows systems.
Base class for the dialogs defined in the other modules listed here.
tkinter.font: Tkinter font-wrapping class
Base class for the dialogs defined in the other modules listed here.
Base class for the dialogs defined in the other modules listed here.
Base class for the dialogs defined in the other modules listed here.
Base class for the dialogs defined in the other modules listed here.
tkinter.systray: System tray icon and desktop notifications
Base class for the dialogs defined in the other modules listed here.
idlelib: Implementation package for the IDLE shell/editor.
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main tkinter module, and should never be used directly by application programmers. It is usually a shared library (or D
tkinter.dnd: Tkinter drag-and-drop interface
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main tkinter module, and should never be used directly by application programmers. It is usually a shared library (or D
turtle: An educational framework for simple graphics applications
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main tkinter module, and should never be used directly by application programmers. It is usually a shared library (or D
How do I…? What option does…?¶
If you’re not sure how to do something in Tkinter, and you can’t immediately find it in the tutorial or reference documentation you’re using, there are a few strategies that can be helpful.
trace: Trace or track Python statement execution.
Register callback to be called when the variable is accessed according to mode. mode is one of the strings 'r', 'w' or 'u', for read, write or unset. Return the internal name of the registered callback. trace() is an ali
copy: Shallow and deep copy operations.
Copy a region from sourceImage (which must be a PhotoImage) into this image, possibly with pixel zooming and/or subsampling. If no options are specified, the whole of sourceImage is copied into this image, starting at co
Tk allows you to register and unregister a callback function which will be called from the Tk mainloop when I/O is possible on a file descriptor. Only one handler may be registered per file descriptor. Example code:
Tk allows you to register and unregister a callback function which will be called from the Tk mainloop when I/O is possible on a file descriptor. Only one handler may be registered per file descriptor. Example code: