doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
tixCommand.tix_configure(cnf=None, **kw) Query or modify the configuration options of the Tix application context. If no option is specified, returns a dictionary all of the available options. If option is specified with no value, then the method returns a list describing the one named option (this list will be ident...
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_configure
tixCommand.tix_filedialog([dlgclass]) Returns the file selection dialog that may be shared among different calls from this application. This method will create a file selection dialog widget when it is called the first time. This dialog will be returned by all subsequent calls to tix_filedialog(). An optional dlgclas...
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_filedialog
tixCommand.tix_getbitmap(name) Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (see the tix_addbitmapdir() method). By using tix_getbitmap(), you can avoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bi...
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_getbitmap
tixCommand.tix_getimage(self, name) Locates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directories (see the tix_addbitmapdir() method above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X disp...
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_getimage
tixCommand.tix_option_get(name) Gets the options maintained by the Tix scheme mechanism.
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_option_get
tixCommand.tix_resetoptions(newScheme, newFontSet[, newScmPrio]) Resets the scheme and fontset of the Tix application to newScheme and newFontSet, respectively. This affects only those widgets created after this call. Therefore, it is best to call the resetoptions method before the creation of any widgets in a Tix ap...
python.library.tkinter.tix#tkinter.tix.tixCommand.tix_resetoptions
class tkinter.tix.Tk(screenName=None, baseName=None, className='Tix') Toplevel widget of Tix which represents mostly the main window of an application. It has an associated Tcl interpreter. Classes in the tkinter.tix module subclasses the classes in the tkinter. The former imports the latter, so to use tkinter.tix wi...
python.library.tkinter.tix#tkinter.tix.Tk
class tkinter.tix.TList The TList widget can be used to display data in a tabular format. The list entries of a TList widget are similar to the entries in the Tk listbox widget. The main differences are (1) the TList widget can display the list entries in a two dimensional format and (2) you can use graphical images ...
python.library.tkinter.tix#tkinter.tix.TList
class tkinter.tix.Tree The Tree widget can be used to display hierarchical data in a tree form. The user can adjust the view of the tree by opening or closing parts of the tree.
python.library.tkinter.tix#tkinter.tix.Tree
class tkinter.Tk(screenName=None, baseName=None, className='Tk', useTk=1) The 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.
python.library.tkinter#tkinter.Tk
tkinter.ttk — Tk themed widgets Source code: Lib/tkinter/ttk.py The tkinter.ttk module provides access to the Tk themed widget set, introduced in Tk 8.5. If Python has not been compiled against Tk 8.5, this module can still be accessed if Tile has been installed. The former method using Tk 8.5 provides additional benef...
python.library.tkinter.ttk
class tkinter.ttk.Combobox current(newindex=None) If newindex is specified, sets the combobox value to the element position newindex. Otherwise, returns the index of the current value or -1 if the current value is not in the values list. get() Returns the current value of the combobox. set(value) Sets...
python.library.tkinter.ttk#tkinter.ttk.Combobox
current(newindex=None) If newindex is specified, sets the combobox value to the element position newindex. Otherwise, returns the index of the current value or -1 if the current value is not in the values list.
python.library.tkinter.ttk#tkinter.ttk.Combobox.current
get() Returns the current value of the combobox.
python.library.tkinter.ttk#tkinter.ttk.Combobox.get
set(value) Sets the value of the combobox to value.
python.library.tkinter.ttk#tkinter.ttk.Combobox.set
class tkinter.ttk.Notebook add(child, **kw) Adds a new tab to the notebook. If window is currently managed by the notebook but hidden, it is restored to its previous position. See Tab Options for the list of available options. forget(tab_id) Removes the tab specified by tab_id, unmaps and unmanages the asso...
python.library.tkinter.ttk#tkinter.ttk.Notebook
add(child, **kw) Adds a new tab to the notebook. If window is currently managed by the notebook but hidden, it is restored to its previous position. See Tab Options for the list of available options.
python.library.tkinter.ttk#tkinter.ttk.Notebook.add
enable_traversal() Enable keyboard traversal for a toplevel window containing this notebook. This will extend the bindings for the toplevel window containing the notebook as follows: Control-Tab: selects the tab following the currently selected one. Shift-Control-Tab: selects the tab preceding the currently select...
python.library.tkinter.ttk#tkinter.ttk.Notebook.enable_traversal
forget(tab_id) Removes the tab specified by tab_id, unmaps and unmanages the associated window.
python.library.tkinter.ttk#tkinter.ttk.Notebook.forget
hide(tab_id) Hides the tab specified by tab_id. The tab will not be displayed, but the associated window remains managed by the notebook and its configuration remembered. Hidden tabs may be restored with the add() command.
python.library.tkinter.ttk#tkinter.ttk.Notebook.hide
identify(x, y) Returns the name of the tab element at position x, y, or the empty string if none.
python.library.tkinter.ttk#tkinter.ttk.Notebook.identify
index(tab_id) Returns the numeric index of the tab specified by tab_id, or the total number of tabs if tab_id is the string “end”.
python.library.tkinter.ttk#tkinter.ttk.Notebook.index
insert(pos, child, **kw) Inserts a pane at the specified position. pos is either the string “end”, an integer index, or the name of a managed child. If child is already managed by the notebook, moves it to the specified position. See Tab Options for the list of available options.
python.library.tkinter.ttk#tkinter.ttk.Notebook.insert
select(tab_id=None) Selects the specified tab_id. The associated child window will be displayed, and the previously-selected window (if different) is unmapped. If tab_id is omitted, returns the widget name of the currently selected pane.
python.library.tkinter.ttk#tkinter.ttk.Notebook.select
tab(tab_id, option=None, **kw) Query or modify the options of the specific tab_id. If kw is not given, returns a dictionary of the tab option values. If option is specified, returns the value of that option. Otherwise, sets the options to the corresponding values.
python.library.tkinter.ttk#tkinter.ttk.Notebook.tab
tabs() Returns a list of windows managed by the notebook.
python.library.tkinter.ttk#tkinter.ttk.Notebook.tabs
class tkinter.ttk.Progressbar start(interval=None) Begin autoincrement mode: schedules a recurring timer event that calls Progressbar.step() every interval milliseconds. If omitted, interval defaults to 50 milliseconds. step(amount=None) Increments the progress bar’s value by amount. amount defaults to 1.0 ...
python.library.tkinter.ttk#tkinter.ttk.Progressbar
start(interval=None) Begin autoincrement mode: schedules a recurring timer event that calls Progressbar.step() every interval milliseconds. If omitted, interval defaults to 50 milliseconds.
python.library.tkinter.ttk#tkinter.ttk.Progressbar.start
step(amount=None) Increments the progress bar’s value by amount. amount defaults to 1.0 if omitted.
python.library.tkinter.ttk#tkinter.ttk.Progressbar.step
stop() Stop autoincrement mode: cancels any recurring timer event initiated by Progressbar.start() for this progress bar.
python.library.tkinter.ttk#tkinter.ttk.Progressbar.stop
class tkinter.ttk.Spinbox get() Returns the current value of the spinbox. set(value) Sets the value of the spinbox to value.
python.library.tkinter.ttk#tkinter.ttk.Spinbox
get() Returns the current value of the spinbox.
python.library.tkinter.ttk#tkinter.ttk.Spinbox.get
set(value) Sets the value of the spinbox to value.
python.library.tkinter.ttk#tkinter.ttk.Spinbox.set
class tkinter.ttk.Style This class is used to manipulate the style database. configure(style, query_opt=None, **kw) Query or set the default value of the specified option(s) in style. Each key in kw is an option and each value is a string identifying the value for that option. For example, to change every default...
python.library.tkinter.ttk#tkinter.ttk.Style
configure(style, query_opt=None, **kw) Query or set the default value of the specified option(s) in style. Each key in kw is an option and each value is a string identifying the value for that option. For example, to change every default button to be a flat button with some padding and a different background color: f...
python.library.tkinter.ttk#tkinter.ttk.Style.configure
element_create(elementname, etype, *args, **kw) Create a new element in the current theme, of the given etype which is expected to be either “image”, “from” or “vsapi”. The latter is only available in Tk 8.6a for Windows XP and Vista and is not described here. If “image” is used, args should contain the default image...
python.library.tkinter.ttk#tkinter.ttk.Style.element_create
element_names() Returns the list of elements defined in the current theme.
python.library.tkinter.ttk#tkinter.ttk.Style.element_names
element_options(elementname) Returns the list of elementname’s options.
python.library.tkinter.ttk#tkinter.ttk.Style.element_options
layout(style, layoutspec=None) Define the widget layout for given style. If layoutspec is omitted, return the layout specification for given style. layoutspec, if specified, is expected to be a list or some other sequence type (excluding strings), where each item should be a tuple and the first item is the layout nam...
python.library.tkinter.ttk#tkinter.ttk.Style.layout
lookup(style, option, state=None, default=None) Returns the value specified for option in style. If state is specified, it is expected to be a sequence of one or more states. If the default argument is set, it is used as a fallback value in case no specification for option is found. To check what font a Button uses b...
python.library.tkinter.ttk#tkinter.ttk.Style.lookup
map(style, query_opt=None, **kw) Query or sets dynamic values of the specified option(s) in style. Each key in kw is an option and each value should be a list or a tuple (usually) containing statespecs grouped in tuples, lists, or some other preference. A statespec is a compound of one or more states and then a value...
python.library.tkinter.ttk#tkinter.ttk.Style.map
theme_create(themename, parent=None, settings=None) Create a new theme. It is an error if themename already exists. If parent is specified, the new theme will inherit styles, elements and layouts from the parent theme. If settings are present they are expected to have the same syntax used for theme_settings().
python.library.tkinter.ttk#tkinter.ttk.Style.theme_create
theme_names() Returns a list of all known themes.
python.library.tkinter.ttk#tkinter.ttk.Style.theme_names
theme_settings(themename, settings) Temporarily sets the current theme to themename, apply specified settings and then restore the previous theme. Each key in settings is a style and each value may contain the keys ‘configure’, ‘map’, ‘layout’ and ‘element create’ and they are expected to have the same format as spec...
python.library.tkinter.ttk#tkinter.ttk.Style.theme_settings
theme_use(themename=None) If themename is not given, returns the theme in use. Otherwise, sets the current theme to themename, refreshes all widgets and emits a <<ThemeChanged>> event.
python.library.tkinter.ttk#tkinter.ttk.Style.theme_use
class tkinter.ttk.Treeview bbox(item, column=None) Returns the bounding box (relative to the treeview widget’s window) of the specified item in the form (x, y, width, height). If column is specified, returns the bounding box of that cell. If the item is not visible (i.e., if it is a descendant of a closed item or...
python.library.tkinter.ttk#tkinter.ttk.Treeview
bbox(item, column=None) Returns the bounding box (relative to the treeview widget’s window) of the specified item in the form (x, y, width, height). If column is specified, returns the bounding box of that cell. If the item is not visible (i.e., if it is a descendant of a closed item or is scrolled offscreen), return...
python.library.tkinter.ttk#tkinter.ttk.Treeview.bbox
column(column, option=None, **kw) Query or modify the options for the specified column. If kw is not given, returns a dict of the column option values. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values. The valid options/values are: id Retur...
python.library.tkinter.ttk#tkinter.ttk.Treeview.column
delete(*items) Delete all specified items and all their descendants. The root item may not be deleted.
python.library.tkinter.ttk#tkinter.ttk.Treeview.delete
detach(*items) Unlinks all of the specified items from the tree. The items and all of their descendants are still present, and may be reinserted at another point in the tree, but will not be displayed. The root item may not be detached.
python.library.tkinter.ttk#tkinter.ttk.Treeview.detach
exists(item) Returns True if the specified item is present in the tree.
python.library.tkinter.ttk#tkinter.ttk.Treeview.exists
focus(item=None) If item is specified, sets the focus item to item. Otherwise, returns the current focus item, or ‘’ if there is none.
python.library.tkinter.ttk#tkinter.ttk.Treeview.focus
get_children(item=None) Returns the list of children belonging to item. If item is not specified, returns root children.
python.library.tkinter.ttk#tkinter.ttk.Treeview.get_children
heading(column, option=None, **kw) Query or modify the heading options for the specified column. If kw is not given, returns a dict of the heading option values. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values. The valid options/values are: ...
python.library.tkinter.ttk#tkinter.ttk.Treeview.heading
identify(component, x, y) Returns a description of the specified component under the point given by x and y, or the empty string if no such component is present at that position.
python.library.tkinter.ttk#tkinter.ttk.Treeview.identify
identify_column(x) Returns the data column identifier of the cell at position x. The tree column has ID #0.
python.library.tkinter.ttk#tkinter.ttk.Treeview.identify_column
identify_element(x, y) Returns the element at position x, y. Availability: Tk 8.6.
python.library.tkinter.ttk#tkinter.ttk.Treeview.identify_element
identify_region(x, y) Returns one of: region meaning heading Tree heading area. separator Space between two columns headings. tree The tree area. cell A data cell. Availability: Tk 8.6.
python.library.tkinter.ttk#tkinter.ttk.Treeview.identify_region
identify_row(y) Returns the item ID of the item at position y.
python.library.tkinter.ttk#tkinter.ttk.Treeview.identify_row
index(item) Returns the integer index of item within its parent’s list of children.
python.library.tkinter.ttk#tkinter.ttk.Treeview.index
insert(parent, index, iid=None, **kw) Creates a new item and returns the item identifier of the newly created item. parent is the item ID of the parent item, or the empty string to create a new top-level item. index is an integer, or the value “end”, specifying where in the list of parent’s children to insert the new...
python.library.tkinter.ttk#tkinter.ttk.Treeview.insert
item(item, option=None, **kw) Query or modify the options for the specified item. If no options are given, a dict with options/values for the item is returned. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values as given by kw.
python.library.tkinter.ttk#tkinter.ttk.Treeview.item
move(item, parent, index) Moves item to position index in parent’s list of children. It is illegal to move an item under one of its descendants. If index is less than or equal to zero, item is moved to the beginning; if greater than or equal to the number of children, it is moved to the end. If item was detached it i...
python.library.tkinter.ttk#tkinter.ttk.Treeview.move
next(item) Returns the identifier of item’s next sibling, or ‘’ if item is the last child of its parent.
python.library.tkinter.ttk#tkinter.ttk.Treeview.next
parent(item) Returns the ID of the parent of item, or ‘’ if item is at the top level of the hierarchy.
python.library.tkinter.ttk#tkinter.ttk.Treeview.parent
prev(item) Returns the identifier of item’s previous sibling, or ‘’ if item is the first child of its parent.
python.library.tkinter.ttk#tkinter.ttk.Treeview.prev
reattach(item, parent, index) An alias for Treeview.move().
python.library.tkinter.ttk#tkinter.ttk.Treeview.reattach
see(item) Ensure that item is visible. Sets all of item’s ancestors open option to True, and scrolls the widget if necessary so that item is within the visible portion of the tree.
python.library.tkinter.ttk#tkinter.ttk.Treeview.see
selection() Returns a tuple of selected items. Changed in version 3.8: selection() no longer takes arguments. For changing the selection state use the following selection methods.
python.library.tkinter.ttk#tkinter.ttk.Treeview.selection
selection_add(*items) Add items to the selection. Changed in version 3.6: items can be passed as separate arguments, not just as a single tuple.
python.library.tkinter.ttk#tkinter.ttk.Treeview.selection_add
selection_remove(*items) Remove items from the selection. Changed in version 3.6: items can be passed as separate arguments, not just as a single tuple.
python.library.tkinter.ttk#tkinter.ttk.Treeview.selection_remove
selection_set(*items) items becomes the new selection. Changed in version 3.6: items can be passed as separate arguments, not just as a single tuple.
python.library.tkinter.ttk#tkinter.ttk.Treeview.selection_set
selection_toggle(*items) Toggle the selection state of each item in items. Changed in version 3.6: items can be passed as separate arguments, not just as a single tuple.
python.library.tkinter.ttk#tkinter.ttk.Treeview.selection_toggle
set(item, column=None, value=None) With one argument, returns a dictionary of column/value pairs for the specified item. With two arguments, returns the current value of the specified column. With three arguments, sets the value of given column in given item to the specified value.
python.library.tkinter.ttk#tkinter.ttk.Treeview.set
set_children(item, *newchildren) Replaces item’s child with newchildren. Children present in item that are not present in newchildren are detached from the tree. No items in newchildren may be an ancestor of item. Note that not specifying newchildren results in detaching item’s children.
python.library.tkinter.ttk#tkinter.ttk.Treeview.set_children
tag_bind(tagname, sequence=None, callback=None) Bind a callback for the given event sequence to the tag tagname. When an event is delivered to an item, the callbacks for each of the item’s tags option are called.
python.library.tkinter.ttk#tkinter.ttk.Treeview.tag_bind
tag_configure(tagname, option=None, **kw) Query or modify the options for the specified tagname. If kw is not given, returns a dict of the option settings for tagname. If option is specified, returns the value for that option for the specified tagname. Otherwise, sets the options to the corresponding values for the g...
python.library.tkinter.ttk#tkinter.ttk.Treeview.tag_configure
tag_has(tagname, item=None) If item is specified, returns 1 or 0 depending on whether the specified item has the given tagname. Otherwise, returns a list of all items that have the specified tag. Availability: Tk 8.6
python.library.tkinter.ttk#tkinter.ttk.Treeview.tag_has
xview(*args) Query or modify horizontal position of the treeview.
python.library.tkinter.ttk#tkinter.ttk.Treeview.xview
yview(*args) Query or modify vertical position of the treeview.
python.library.tkinter.ttk#tkinter.ttk.Treeview.yview
class tkinter.ttk.Widget identify(x, y) Returns the name of the element at position x y, or the empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget. instate(statespec, callback=None, *args, **kw) Test the widget’s state. If a callback is not specif...
python.library.tkinter.ttk#tkinter.ttk.Widget
identify(x, y) Returns the name of the element at position x y, or the empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget.
python.library.tkinter.ttk#tkinter.ttk.Widget.identify
instate(statespec, callback=None, *args, **kw) Test the widget’s state. If a callback is not specified, returns True if the widget state matches statespec and False otherwise. If callback is specified then it is called with args if widget state matches statespec.
python.library.tkinter.ttk#tkinter.ttk.Widget.instate
state(statespec=None) Modify or inquire widget state. If statespec is specified, sets the widget state according to it and return a new statespec indicating which flags were changed. If statespec is not specified, returns the currently-enabled state flags.
python.library.tkinter.ttk#tkinter.ttk.Widget.state
Widget.tk.createfilehandler(file, mask, func) Registers the file handler callback function func. The file argument may either be an object with a fileno() method (such as a file or socket object), or an integer file descriptor. The mask argument is an ORed combination of any of the three constants below. The callback...
python.library.tkinter#tkinter.Widget.tk.createfilehandler
Widget.tk.deletefilehandler(file) Unregisters a file handler.
python.library.tkinter#tkinter.Widget.tk.deletefilehandler
tkinter.READABLE tkinter.WRITABLE tkinter.EXCEPTION Constants used in the mask arguments.
python.library.tkinter#tkinter.WRITABLE
token — Constants used with Python parse trees Source code: Lib/token.py This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file Grammar/Grammar in the Python distribution for the definitions of the names in the context of the language gramm...
python.library.token
token.AMPER Token value for "&".
python.library.token#token.AMPER
token.AMPEREQUAL Token value for "&=".
python.library.token#token.AMPEREQUAL
token.ASYNC
python.library.token#token.ASYNC
token.AT Token value for "@".
python.library.token#token.AT
token.ATEQUAL Token value for "@=".
python.library.token#token.ATEQUAL
token.AWAIT
python.library.token#token.AWAIT
token.CIRCUMFLEX Token value for "^".
python.library.token#token.CIRCUMFLEX
token.CIRCUMFLEXEQUAL Token value for "^=".
python.library.token#token.CIRCUMFLEXEQUAL
token.COLON Token value for ":".
python.library.token#token.COLON
token.COLONEQUAL Token value for ":=".
python.library.token#token.COLONEQUAL
token.COMMA Token value for ",".
python.library.token#token.COMMA
token.COMMENT Token value used to indicate a comment.
python.library.token#token.COMMENT