-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
help wantedAn actionable problem of low to medium complexity where a PR would be very welcomeAn actionable problem of low to medium complexity where a PR would be very welcometopic: tkintertkinter-related issuestkinter-related issues
Description
Tkinter is very dynamic. Most keyword arguments are passed to Tcl, and their behavior is described best in manual pages written for Tcl users. This means that when we ran stubdefaulter to figure out default values for most functions in typeshed, it didn't do much for tkinter, and most of tkinter's default values are still = ...
.
I (or someone else) should go through the = ...
occurrences and fill in whatever can be filled. Often the default values are platform-specific, and hard-coding something into the stubs doesn't make sense.
Most defaults in tkinter are widget options (__init__
and configure()
methods). To see their default values on your system, you can instantiate the widget and convert it to a dict. For example:
>>> import pprint
>>> import tkinter
>>> pprint.pprint(dict(tkinter.Text()))
{'autoseparators': 1,
'background': '#3b3b3e',
'bd': 1,
'bg': '#3b3b3e',
'blockcursor': 0,
'borderwidth': 1,
'cursor': 'xterm',
'endline': '',
'exportselection': 1,
'fg': '#ffffff',
'font': 'TkFixedFont',
'foreground': '#ffffff',
'height': 24,
'highlightbackground': '#3b3b3e',
'highlightcolor': '#ffffff',
'highlightthickness': 1,
'inactiveselectbackground': '#c3c3c3',
'insertbackground': '#000000',
'insertborderwidth': 0,
'insertofftime': 300,
'insertontime': 600,
'insertunfocussed': 'none',
'insertwidth': 2,
'maxundo': 0,
'padx': 1,
'pady': 1,
'relief': 'sunken',
'selectbackground': '#7d7d82',
'selectborderwidth': <pixel object: '0'>,
'selectforeground': '#ffffff',
'setgrid': 0,
'spacing1': 0,
'spacing2': 0,
'spacing3': 0,
'startline': '',
'state': 'normal',
'tabs': '',
'tabstyle': 'tabular',
'takefocus': '',
'undo': 0,
'width': 80,
'wrap': 'char',
'xscrollcommand': '',
'yscrollcommand': ''}
AlexWaygood and CTimmerman
Metadata
Metadata
Assignees
Labels
help wantedAn actionable problem of low to medium complexity where a PR would be very welcomeAn actionable problem of low to medium complexity where a PR would be very welcometopic: tkintertkinter-related issuestkinter-related issues