summaryrefslogtreecommitdiffstats
path: root/Doc/lib/tkinter.tex
diff options
context:
space:
mode:
authorDavid Ascher <david.ascher@gmail.com>2004-02-18 05:59:53 (GMT)
committerDavid Ascher <david.ascher@gmail.com>2004-02-18 05:59:53 (GMT)
commite2b4b3202588e0ea87bbc6967c79339979f8d0f4 (patch)
tree30016d15595e4475241ab48595aeb24ffcf0fbd9 /Doc/lib/tkinter.tex
parentf06116dcab8f6066f78c522c056ffb9c2403706c (diff)
downloadcpython-e2b4b3202588e0ea87bbc6967c79339979f8d0f4.zip
cpython-e2b4b3202588e0ea87bbc6967c79339979f8d0f4.tar.gz
cpython-e2b4b3202588e0ea87bbc6967c79339979f8d0f4.tar.bz2
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/lib/tkinter.tex')
-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 e0c613f..55f822f 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}