Lines Matching refs:Tk
1 :mod:`Tkinter` --- Python interface to Tcl/Tk
5 :synopsis: Interface to Tcl/Tk for graphical user interfaces
9 The :mod:`Tkinter` module ("Tk interface") is the standard Python interface to
10 the Tk GUI toolkit. Both Tk and :mod:`Tkinter` are available on most Unix
11 platforms, as well as on Windows systems. (Tk itself is not part of Python; it
15 demonstrating a simple Tk interface, letting you know that :mod:`Tkinter` is
16 properly installed on your system, and also showing what version of Tcl/Tk is
17 installed, so you can read the Tcl/Tk documentation specific to that version.
30 The Python Tkinter Topic Guide provides a great deal of information on using Tk
31 from Python and links to other sources of information on Tk.
51 Tcl/Tk documentation:
53 `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
55 Change '8.6' to match the version of your Tcl/Tk installation.
57 `Tcl/Tk recent man pages <https://www.tcl.tk/doc/>`_
58 Recent Tcl/Tk manuals on www.tcl.tk.
61 The Tk/Tcl development is largely taking place at ActiveState.
63 `Tcl and the Tk Toolkit <https://www.amazon.com/exec/obidos/ASIN/020163337X>`_
66 `Practical Programming in Tcl and Tk <http://www.beedub.com/book/>`_
74 of additional modules are available as well. The Tk interface is located in a
76 interface to Tk, and should never be used directly by application programmers.
80 In addition to the Tk interface module, :mod:`Tkinter` includes a number of
92 .. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=1)
94 The :class:`Tk` class is instantiated without arguments. This creates a toplevel
95 widget of Tk which usually is the main window of an application. Each instance
104 .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=0)
107 that created by the :class:`Tk` class, except that it does not initialize the Tk
111 created by the :func:`Tcl` object can have a Toplevel window created (and the Tk
116 Other modules that provide Tk support include:
134 Access to standard Tk dialog boxes.
141 deprecated when it is replaced with the Tk DND.
144 Turtle graphics in a Tk window.
156 This section is not designed to be an exhaustive tutorial on either Tk or
164 * Tk was written by John Ousterhout while at Berkeley.
172 them current with Tk 4.2.
186 to find out how to do "blah" in straight Tk, and then convert this back into the
188 correct Python command by looking at the Tk documentation. This means that in
189 order to use Tkinter, you will have to know a little bit about Tk. This document
193 * The authors strongly suggest getting a copy of the Tk man pages. Specifically,
195 describe the C interface to the Tk library and thus are not especially helpful
198 * Addison-Wesley publishes a book called Tcl and the Tk Toolkit by John
199 Ousterhout (ISBN 0-201-63337-X) which is a good introduction to Tcl and Tk for
237 root = Tk()
243 A (Very) Quick Look at Tcl/Tk
255 * The :class:`Tk` class is meant to be instantiated only once in an application.
264 to know how to read short passages of Tk and how to identify the various parts
265 of a Tk command. (See section :ref:`tkinter-basic-mapping` for the
268 Tk scripts are Tcl programs. Like all Tcl programs, Tk scripts are just lists
269 of tokens separated by spaces. A Tk widget is just its *class*, the *options*
272 To make a widget in Tk, the command is always of the form::
280 is the new name for this widget. All names in Tk must be unique. To help
281 enforce this, widgets in Tk are named with *pathnames*, just like files in a
304 and in Tk, you say::
312 does not work if fred is a label (disabling of labels is not supported in Tk).
321 Mapping Basic Tk into Tkinter
324 Class commands in Tk correspond to class constructors in Tkinter. ::
333 The configuration options in Tk are given in lists of hyphened tags followed by
343 In Tk, to perform an action on a widget, use the widget name as a command, and
361 How Tk and Tkinter are Related
373 as if they had come from a Tk script instead of a Python script.
379 Tk Widgets (C and Tcl)
381 functions that make up the Tk library. Tk is implemented in C and some Tcl.
382 The Tcl part of the Tk widgets is used to bind certain default behaviors to
386 Tk (C)
387 The Tk part of the Tk Widgets implement the final mapping to ...
421 For a complete explanation of a given option and its behavior, see the Tk man
476 The packer is one of Tk's geometry-management mechanisms. Geometry managers
586 In Tk, there is a utility command, ``wm``, for interacting with the window
598 part of the implementation, and not an interface to Tk functionality.
622 Tk Option Data Types
625 .. index:: single: Tk Option Data Types
667 Tk uses a list font name format, such as ``{courier 10 bold}``. Font sizes with
739 they are denoted in Tk, which can be useful when referring to the Tk man pages.
742 Tk Tkinter Event Field Tk Tkinter Event Field
783 The index notation for Text widgets is very rich and is best described in the Tk
820 is supported starting with Tk 8.6.
826 some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a
828 deleted, the image data is deleted as well, and Tk will display an empty box
841 Tk allows you to register and unregister a callback function which will be
842 called from the Tk mainloop when I/O is possible on a file descriptor.
846 widget = Tkinter.Tk()