-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-13553: Document tkinter.Tk args #4786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fdc96ed
35c6465
df696bb
0f468bc
c25db70
9068406
0054844
57553df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,13 +67,33 @@ Or, more often:: | |
from tkinter import * | ||
|
||
|
||
.. class:: 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 application. Each instance | ||
has its own associated Tcl interpreter. | ||
|
||
.. FIXME: The following keyword arguments are currently recognized: | ||
.. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=1, sync=0, use=None) | ||
|
||
Return a toplevel Tk widget, which is usually the main window of an | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
application. Each instance has its own associated Tcl interpreter. | ||
|
||
The :class:`Tk` class is typically instantiated using all default values. | ||
However, the following keyword arguments are currently recognized: | ||
|
||
*screenName* | ||
Sets the DISPLAY environmental variable. (X11 only) | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*baseName* | ||
Reads the profile file :file:`baseName.tcl` into the Tcl interpreter and | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
calls ``exec`` on the contents of :file:`baseName.py`. | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*className* | ||
Name of the widget class. Used as a profile file name | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
(:file:`className.tcl` and :file:`className.py` load before the | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*baseName* files), and also used as the name with which Tcl is | ||
invoked (*argv0* in *interp*). | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*useTk* | ||
If True, initialize the Tk subsystem. :func:`Tcl` sets this to False. | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*sync* | ||
If True, execute all X server commands synchronously, so that errors are | ||
reported immediately. | ||
*use* | ||
Specifies that the main window for the application is to be embedded in | ||
the window whose identifier is given, instead of being created as an | ||
independent toplevel window. | ||
JulienPalard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While we are documenting the Tk class. Would it be worth it to document Tk attributes? master, children and tk. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current page reads more like a 'getting started' or 'how to', so I wasn't sure how much detail to add. I know there's a separate bug issue where Terry figured out the difference between master and parent, so maybe it would be worthwhile to include that here? |
||
|
||
.. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=0) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Document tkinter.Tk args. |
Uh oh!
There was an error while loading. Please reload this page.