summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorDavid Ascher <david.ascher@gmail.com>2004-02-18 05:59:53 +0000
committerDavid Ascher <david.ascher@gmail.com>2004-02-18 05:59:53 +0000
commitbe576d1e2c6575c02b75e6704a2e9a596d3904f2 (patch)
tree0fce8da7b3a55ba9015fba54043e7aacb3cf9efd /Doc
parent8494fafcd60a0953b6ee93be1a62dc8cb494032f (diff)
downloadcpython-be576d1e2c6575c02b75e6704a2e9a596d3904f2.tar.gz
Implementation of patch 869468
Allow the user to create Tkinter.Tcl objects which are just like Tkinter.Tk objects except that they do not initialize Tk. This is useful in circumstances where the script is being run on machines that do not have an X server running -- in those cases, Tk initialization fails, even if no window is ever created. Includes documentation change and tests. Tested on Linux, Solaris and Windows. Reviewed by Martin von Loewis.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/tkinter.tex13
1 files changed, 12 insertions, 1 deletions
diff --git a/Doc/lib/tkinter.tex b/Doc/lib/tkinter.tex
index e0c613f28a..55f822ffd3 100644
--- a/Doc/lib/tkinter.tex
+++ b/Doc/lib/tkinter.tex
@@ -94,13 +94,24 @@ Or, more often:
from Tkinter import *
\end{verbatim}
-\begin{classdesc}{Tk}{screenName=None, baseName=None, className='Tk'}
+\begin{classdesc}{Tk}{screenName=None, baseName=None, className='Tk', useTk=1}
The \class{Tk} class is instantiated without arguments.
This creates a toplevel widget of Tk which usually is the main window
of an appliation. Each instance has its own associated Tcl interpreter.
% FIXME: The following keyword arguments are currently recognized:
\end{classdesc}
+\begin{funcdesc}{Tcl}{screenName=None, baseName=None, className='Tk', useTk=0}
+The \function{Tcl} function is a factory function which creates an object
+much like that created by the \class{Tk} class, except that it does not
+initialize the Tk subsystem. This is most often useful when driving the Tcl
+interpreter in an environment where one doesn't want to create extraneous
+toplevel windows, or where one cannot (i.e. Unix/Linux systems without an X
+server). An object created by the \function{Tcl} object can have a Toplevel
+window created (and the Tk subsystem initialized) by calling its
+\method{loadtk} method.
+\end{funcdesc}
+
Other modules that provide Tk support include:
\begin{description}