pythongis.app.tk2.texteditor module
The SuperText class inherits from Tkinter's Text class and provides added functionality to a standard text widget:
- Option to turn scrollbar on/off
- Right-click pop-up menu
- Two themes included (terminal and typewriter)
Compliant with Python 2.5-2.7
Author: @ifthisthenbreak http://code.activestate.com/recipes/578897-supertext-scrollable-text-with-pop-up-menu-and-the/
Expanded on by Karim Bahgat, 2015
Functions
def easy_searchpattern_to_regex(
term)
Classes
class MultiTextSearch
Ancestors (in MRO)
- MultiTextSearch
- pythongis.app.tk2.scrollwidgets.Frame
- pythongis.app.tk2.mixins.AllMixins
- pythongis.app.tk2.mixins.DnDMixin
- pythongis.app.tk2.mixins.DispatchMixin
- pythongis.app.tk2.mixins.AnimMixin
- pythongis.app.tk2.mixins.BindMixin
- __builtin__.object
- Tkinter.LabelFrame
- Tkinter.Widget
- Tkinter.BaseWidget
- Tkinter.Misc
- Tkinter.Pack
- Tkinter.Place
- Tkinter.Grid
Methods
def __init__(
self, master, stylename, highlightstyle, imgs={}, **kwargs)
def add_searchterm(
self, searchterm)
def after(
self, ms, func=None, *args)
Call function once after given time.
MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.
def after_cancel(
self, id)
Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be given as first parameter.
def after_idle(
self, func, *args)
Call FUNC once if the Tcl main loop has no event to process.
Return an identifier to cancel the scheduling with after_cancel.
def after_thread(
self, thread, task, args=(), kwargs={}, mslag=100, msinterval=100)
def bbox(
self, column=None, row=None, col2=None, row2=None)
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
def bell(
self, displayof=0)
Ring a display's bell.
def bind(
self, eventtype, eventfunc, add=None, bindname=None)
def bind_all(
self, sequence=None, func=None, add=None)
Bind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_class(
self, className, sequence=None, func=None, add=None)
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_dnddrop(
self, callback, dndtype, event='<Drop>', priority=50)
dndtype is either Files or Text.
def bind_draggable(
self)
def bind_once(
self, eventtype, eventfunc, add=None)
def bind_rightclick(
self, menuitems)
menuitems can be a sequence or a function for dynamic listing
def bind_until(
self, eventtype, eventfunc, add=None, bindname=None, untilevent=None, untilexpires=None)
def bindtags(
self, tagList=None)
Set or get the list of bindtags for this widget.
With no argument return the list of all bindtags associated with this widget. With a list of strings as argument the bindtags are set to this list. The bindtags determine in which order events are processed (see bind).
def cget(
self, key)
Return the resource value for a KEY given as string.
def clipboard_append(
self, string, **kw)
Append STRING to the Tk clipboard.
A widget specified at the optional displayof keyword argument specifies the target display. The clipboard can be retrieved with selection_get.
def clipboard_clear(
self, **kw)
Clear the data in the Tk clipboard.
A widget specified for the optional displayof keyword argument specifies the target display.
def clipboard_get(
self, **kw)
Retrieve data from the clipboard on window's display.
The window keyword defaults to the root window of the Tkinter application.
The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING, except on X11, where the default is to try UTF8_STRING and fall back to STRING.
This command is equivalent to:
selection_get(CLIPBOARD)
def colormodel(
self, value=None)
Useless. Not implemented in Tk.
def columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def config(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def configure(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def deletecommand(
self, name)
Internal function.
Delete the Tcl command provided in NAME.
def destroy(
self)
Destroy this and all descendants widgets.
def drag_follow(
self, event)
def drag_mark(
self, event)
def event_add(
self, virtual, *sequences)
Bind a virtual event VIRTUAL (of the form <
def event_delete(
self, virtual, *sequences)
Unbind a virtual event VIRTUAL from SEQUENCE.
def event_generate(
self, sequence, **kw)
Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).
def event_info(
self, virtual=None)
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.
def focus(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def focus_displayof(
self)
Return the widget which has currently the focus on the display where this widget is located.
Return None if the application does not have the focus.
def focus_force(
self)
Direct input focus to this widget even if the application does not have the focus. Use with caution!
def focus_get(
self)
Return the widget which has currently the focus in the application.
Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
def focus_lastfor(
self)
Return the widget which would have the focus if top level for this widget gets the focus from the window manager.
def focus_set(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def forget(
self)
Unmap this widget and do not use it for the packing order.
def getboolean(
self, s)
Return a boolean value for Tcl boolean values true and false given as parameter.
def getvar(
self, name='PY_VAR')
Return value of Tcl variable NAME.
def grab_current(
self)
Return widget which has currently the grab in this application or None.
def grab_release(
self)
Release grab for this widget if currently set.
def grab_set(
self)
Set grab for this widget.
A grab directs all events to this and descendant widgets in the application.
def grab_set_global(
self)
Set global grab for this widget.
A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.
def grab_status(
self)
Return None, "local" or "global" if this widget has no, a local or a global grab.
def grid(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_bbox(
self, column=None, row=None, col2=None, row2=None)
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
def grid_columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def grid_configure(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_forget(
self)
Unmap this widget.
def grid_info(
self)
Return information about the options for positioning this widget in a grid.
def grid_location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def grid_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.
def grid_remove(
self)
Unmap this widget but remember the grid options.
def grid_rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def grid_size(
self)
Return a tuple of the number of column and rows in the grid.
def grid_slaves(
self, row=None, column=None)
Return a list of all slaves of this widget in its packing order.
def highlight(
self, easysearch=True, **kwargs)
def image_names(
self)
Return a list of all existing image names.
def image_types(
self)
Return a list of all available image types (e.g. photo bitmap).
def info(
self)
Return information about the packing options for this widget.
def jitter(
self, movepixels=3, frequency=0.0002, duration=0.5, pindown=True)
Jitters/shakes the widget for a certain duration.
- movepixels: maximum pixels to randomly shake from base position
- frequency: how much time in comma seconds in between each shake movement
- duration: how long in seconds the jitter should last
- pindown: whether to center the jittering around the widget's original starting point or to let it jitter freely and end up in a new location
def keys(
self)
Return a list of all resource names of this widget.
def lift(
self, aboveThis=None)
Raise this widget in the stacking order.
def location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def lower(
self, belowThis=None)
Lower this widget in the stacking order.
def mainloop(
self, n=0)
Call the mainloop of Tk.
def move(
self, xmove, ymove, **kwargs)
def move_to(
self, endx, endy, speed='not specified', accel='not specified', deaccel='not specified', effect='not specified')
Gradually moves a widget in a direct line towards endxy pixel coordinates. None of the options besides endxy are currently working. Note: requires that the widget uses a place manager (not pack or grid)
- endxy: the end coordinate towards which to move the widget
- speed: full speed pixels per ms
- accel: 0 to 100 percentage speed buildup per ms
- deaccel: 0 to 100 percentage speed lowering per ms
- effect: some added effect to use on startup and slowdown (eg wobbly jello, shake)
def nametowidget(
self, name)
Return the Tkinter instance of a widget identified by its Tcl name NAME.
def new_thread(
self, task, args=(), kwargs={})
def option_add(
self, pattern, value, priority=None)
Set a VALUE (second parameter) for an option PATTERN (first parameter).
An optional third parameter gives the numeric priority (defaults to 80).
def option_clear(
self)
Clear the option database.
It will be reloaded if option_add is called.
def option_get(
self, name, className)
Return the value for an option NAME for this widget with CLASSNAME.
Values with higher priority override lower values.
def option_readfile(
self, fileName, priority=None)
Read file FILENAME into the option database.
An optional second parameter gives the numeric priority.
def pack(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_configure(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_forget(
self)
Unmap this widget and do not use it for the packing order.
def pack_info(
self)
Return information about the packing options for this widget.
def pack_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def pack_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def place(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_configure(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_forget(
self)
Unmap this widget.
def place_info(
self)
Return information about the placing options for this widget.
def place_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def process_thread(
self, thread, func, mslag=100, msinterval=100)
def propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def quit(
self)
Quit the Tcl interpreter. All widgets will be destroyed.
def register(
self, func, subst=None, needcleanup=1)
Return a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.
def rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def selection_clear(
self, **kw)
Clear the current X selection.
def selection_get(
self, **kw)
Return the contents of the current X selection.
A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use. A keyword parameter type specifies the form of data to be fetched, defaulting to STRING except on X11, where UTF8_STRING is tried before STRING.
def selection_handle(
self, command, **kw)
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.
This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking of very long selections. The following keyword parameters can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def selection_own(
self, **kw)
Become owner of X selection.
A keyword parameter selection specifies the name of the selection (default PRIMARY).
def selection_own_get(
self, **kw)
Return owner of X selection.
The following keyword parameter can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def send(
self, interp, cmd, *args)
Send Tcl command CMD to different interpreter INTERP to be executed.
def setvar(
self, name='PY_VAR', value='1')
Set Tcl variable NAME to VALUE.
def size(
self)
Return a tuple of the number of column and rows in the grid.
def slaves(
self)
Return a list of all slaves of this widget in its packing order.
def tk_bisque(
self)
Change the color scheme to light brown as used in Tk 3.6 and before.
def tk_focusFollowsMouse(
self)
The widget under mouse will get automatically focus. Can not be disabled easily.
def tk_focusNext(
self)
Return the next widget in the focus order which follows widget which has currently the focus.
The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.
def tk_focusPrev(
self)
Return previous widget in the focus order. See tk_focusNext for details.
Do not use. Needed in Tk 3.6 and earlier.
def tk_setPalette(
self, *args, **kw)
Set a new color scheme for all widget elements.
A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.
def tk_strictMotif(
self, boolean=None)
Set Tcl internal variable, whether the look and feel should adhere to Motif.
A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.
def tkraise(
self, aboveThis=None)
Raise this widget in the stacking order.
def unbind(
self, eventtype, bindid)
def unbind_all(
self, sequence)
Unbind for all widgets for event SEQUENCE all functions.
def unbind_class(
self, className, sequence)
Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE all functions.
def unbind_dnddrop(
self)
def unbind_draggable(
self)
def unbind_rightclick(
self)
def update(
self)
Enter event loop until all pending events have been processed by Tcl.
def update_idletasks(
self)
Enter event loop until all idle callbacks have been called. This will update the display of windows but not process events caused by the user.
def wait_variable(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def wait_visibility(
self, window=None)
Wait until the visibility of a WIDGET changes (e.g. it appears).
If no parameter is given self is used.
def wait_window(
self, window=None)
Wait until a WIDGET is destroyed.
If no parameter is given self is used.
def waitvar(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def winfo_atom(
self, name, displayof=0)
Return integer which represents atom NAME.
def winfo_atomname(
self, id, displayof=0)
Return name of atom with identifier ID.
def winfo_cells(
self)
Return number of cells in the colormap for this widget.
def winfo_children(
self)
Return a list of all widgets which are children of this widget.
def winfo_class(
self)
Return window class name of this widget.
def winfo_colormapfull(
self)
Return true if at the last color request the colormap was full.
def winfo_containing(
self, rootX, rootY, displayof=0)
Return the widget which is at the root coordinates ROOTX, ROOTY.
def winfo_depth(
self)
Return the number of bits per pixel.
def winfo_exists(
self)
Return true if this widget exists.
def winfo_fpixels(
self, number)
Return the number of pixels for the given distance NUMBER (e.g. "3c") as float.
def winfo_geometry(
self)
Return geometry string for this widget in the form "widthxheight+X+Y".
def winfo_height(
self)
Return height of this widget.
def winfo_id(
self)
Return identifier ID for this widget.
def winfo_interps(
self, displayof=0)
Return the name of all Tcl interpreters for this display.
def winfo_ismapped(
self)
Return true if this widget is mapped.
def winfo_manager(
self)
Return the window manager name for this widget.
def winfo_name(
self)
Return the name of this widget.
def winfo_parent(
self)
Return the name of the parent of this widget.
def winfo_pathname(
self, id, displayof=0)
Return the pathname of the widget given by ID.
def winfo_pixels(
self, number)
Rounded integer value of winfo_fpixels.
def winfo_pointerx(
self)
Return the x coordinate of the pointer on the root window.
def winfo_pointerxy(
self)
Return a tuple of x and y coordinates of the pointer on the root window.
def winfo_pointery(
self)
Return the y coordinate of the pointer on the root window.
def winfo_reqheight(
self)
Return requested height of this widget.
def winfo_reqwidth(
self)
Return requested width of this widget.
def winfo_rgb(
self, color)
Return tuple of decimal values for red, green, blue for COLOR in this widget.
def winfo_rootx(
self)
Return x coordinate of upper left corner of this widget on the root window.
def winfo_rooty(
self)
Return y coordinate of upper left corner of this widget on the root window.
def winfo_screen(
self)
Return the screen name of this widget.
def winfo_screencells(
self)
Return the number of the cells in the colormap of the screen of this widget.
def winfo_screendepth(
self)
Return the number of bits per pixel of the root window of the screen of this widget.
def winfo_screenheight(
self)
Return the number of pixels of the height of the screen of this widget in pixel.
def winfo_screenmmheight(
self)
Return the number of pixels of the height of the screen of this widget in mm.
def winfo_screenmmwidth(
self)
Return the number of pixels of the width of the screen of this widget in mm.
def winfo_screenvisual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.
def winfo_screenwidth(
self)
Return the number of pixels of the width of the screen of this widget in pixel.
def winfo_server(
self)
Return information of the X-Server of the screen of this widget in the form "XmajorRminor vendor vendorVersion".
def winfo_toplevel(
self)
Return the toplevel widget of this widget.
def winfo_viewable(
self)
Return true if the widget and all its higher ancestors are mapped.
def winfo_visual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.
def winfo_visualid(
self)
Return the X identifier for the visual for this widget.
def winfo_visualsavailable(
self, includeids=0)
Return a list of all visuals available for the screen of this widget.
Each item in the list consists of a visual name (see winfo_visual), a depth and if INCLUDEIDS=1 is given also the X identifier.
def winfo_vrootheight(
self)
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
def winfo_vrootwidth(
self)
Return the width of the virtual root window associated with this widget in pixel. If there is no virtual root window return the width of the screen.
def winfo_vrootx(
self)
Return the x offset of the virtual root relative to the root window of the screen of this widget.
def winfo_vrooty(
self)
Return the y offset of the virtual root relative to the root window of the screen of this widget.
def winfo_width(
self)
Return the width of this widget.
def winfo_x(
self)
Return the x coordinate of the upper left corner of this widget in the parent.
def winfo_y(
self)
Return the y coordinate of the upper left corner of this widget in the parent.
class SearchTerm
Ancestors (in MRO)
- SearchTerm
- pythongis.app.tk2.basics.Label
- pythongis.app.tk2.mixins.AllMixins
- pythongis.app.tk2.mixins.DnDMixin
- pythongis.app.tk2.mixins.DispatchMixin
- pythongis.app.tk2.mixins.AnimMixin
- pythongis.app.tk2.mixins.BindMixin
- __builtin__.object
- ttk.Label
- ttk.Widget
- Tkinter.Widget
- Tkinter.BaseWidget
- Tkinter.Misc
- Tkinter.Pack
- Tkinter.Place
- Tkinter.Grid
Methods
def __init__(
self, master, imgs={}, **kwargs)
def after(
self, ms, func=None, *args)
Call function once after given time.
MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.
def after_cancel(
self, id)
Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be given as first parameter.
def after_idle(
self, func, *args)
Call FUNC once if the Tcl main loop has no event to process.
Return an identifier to cancel the scheduling with after_cancel.
def after_thread(
self, thread, task, args=(), kwargs={}, mslag=100, msinterval=100)
def bbox(
self, column=None, row=None, col2=None, row2=None)
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
def bell(
self, displayof=0)
Ring a display's bell.
def bind(
self, eventtype, eventfunc, add=None, bindname=None)
def bind_all(
self, sequence=None, func=None, add=None)
Bind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_class(
self, className, sequence=None, func=None, add=None)
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_dnddrop(
self, callback, dndtype, event='<Drop>', priority=50)
dndtype is either Files or Text.
def bind_draggable(
self)
def bind_once(
self, eventtype, eventfunc, add=None)
def bind_rightclick(
self, menuitems)
menuitems can be a sequence or a function for dynamic listing
def bind_until(
self, eventtype, eventfunc, add=None, bindname=None, untilevent=None, untilexpires=None)
def bindtags(
self, tagList=None)
Set or get the list of bindtags for this widget.
With no argument return the list of all bindtags associated with this widget. With a list of strings as argument the bindtags are set to this list. The bindtags determine in which order events are processed (see bind).
def cget(
self, key)
Return the resource value for a KEY given as string.
def clipboard_append(
self, string, **kw)
Append STRING to the Tk clipboard.
A widget specified at the optional displayof keyword argument specifies the target display. The clipboard can be retrieved with selection_get.
def clipboard_clear(
self, **kw)
Clear the data in the Tk clipboard.
A widget specified for the optional displayof keyword argument specifies the target display.
def clipboard_get(
self, **kw)
Retrieve data from the clipboard on window's display.
The window keyword defaults to the root window of the Tkinter application.
The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING, except on X11, where the default is to try UTF8_STRING and fall back to STRING.
This command is equivalent to:
selection_get(CLIPBOARD)
def colormodel(
self, value=None)
Useless. Not implemented in Tk.
def columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def config(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def configure(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def deletecommand(
self, name)
Internal function.
Delete the Tcl command provided in NAME.
def destroy(
self)
Destroy this and all descendants widgets.
def drag_follow(
self, event)
def drag_mark(
self, event)
def event_add(
self, virtual, *sequences)
Bind a virtual event VIRTUAL (of the form <
def event_delete(
self, virtual, *sequences)
Unbind a virtual event VIRTUAL from SEQUENCE.
def event_generate(
self, sequence, **kw)
Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).
def event_info(
self, virtual=None)
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.
def focus(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def focus_displayof(
self)
Return the widget which has currently the focus on the display where this widget is located.
Return None if the application does not have the focus.
def focus_force(
self)
Direct input focus to this widget even if the application does not have the focus. Use with caution!
def focus_get(
self)
Return the widget which has currently the focus in the application.
Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
def focus_lastfor(
self)
Return the widget which would have the focus if top level for this widget gets the focus from the window manager.
def focus_set(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def forget(
self)
Unmap this widget and do not use it for the packing order.
def getboolean(
self, s)
Return a boolean value for Tcl boolean values true and false given as parameter.
def getvar(
self, name='PY_VAR')
Return value of Tcl variable NAME.
def grab_current(
self)
Return widget which has currently the grab in this application or None.
def grab_release(
self)
Release grab for this widget if currently set.
def grab_set(
self)
Set grab for this widget.
A grab directs all events to this and descendant widgets in the application.
def grab_set_global(
self)
Set global grab for this widget.
A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.
def grab_status(
self)
Return None, "local" or "global" if this widget has no, a local or a global grab.
def grid(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_bbox(
self, column=None, row=None, col2=None, row2=None)
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
def grid_columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def grid_configure(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_forget(
self)
Unmap this widget.
def grid_info(
self)
Return information about the options for positioning this widget in a grid.
def grid_location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def grid_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.
def grid_remove(
self)
Unmap this widget but remember the grid options.
def grid_rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def grid_size(
self)
Return a tuple of the number of column and rows in the grid.
def grid_slaves(
self, row=None, column=None)
Return a list of all slaves of this widget in its packing order.
def identify(
self, 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.
def image_names(
self)
Return a list of all existing image names.
def image_types(
self)
Return a list of all available image types (e.g. photo bitmap).
def info(
self)
Return information about the packing options for this widget.
def instate(
self, statespec, callback=None, *args, **kw)
Test the widget's state.
If callback is not specified, returns True if the widget state matches statespec and False otherwise. If callback is specified, then it will be invoked with args, *kw if the widget state matches statespec. statespec is expected to be a sequence.
def jitter(
self, movepixels=3, frequency=0.0002, duration=0.5, pindown=True)
Jitters/shakes the widget for a certain duration.
- movepixels: maximum pixels to randomly shake from base position
- frequency: how much time in comma seconds in between each shake movement
- duration: how long in seconds the jitter should last
- pindown: whether to center the jittering around the widget's original starting point or to let it jitter freely and end up in a new location
def keys(
self)
Return a list of all resource names of this widget.
def lift(
self, aboveThis=None)
Raise this widget in the stacking order.
def location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def lower(
self, belowThis=None)
Lower this widget in the stacking order.
def mainloop(
self, n=0)
Call the mainloop of Tk.
def move(
self, xmove, ymove, **kwargs)
def move_to(
self, endx, endy, speed='not specified', accel='not specified', deaccel='not specified', effect='not specified')
Gradually moves a widget in a direct line towards endxy pixel coordinates. None of the options besides endxy are currently working. Note: requires that the widget uses a place manager (not pack or grid)
- endxy: the end coordinate towards which to move the widget
- speed: full speed pixels per ms
- accel: 0 to 100 percentage speed buildup per ms
- deaccel: 0 to 100 percentage speed lowering per ms
- effect: some added effect to use on startup and slowdown (eg wobbly jello, shake)
def nametowidget(
self, name)
Return the Tkinter instance of a widget identified by its Tcl name NAME.
def new_thread(
self, task, args=(), kwargs={})
def option_add(
self, pattern, value, priority=None)
Set a VALUE (second parameter) for an option PATTERN (first parameter).
An optional third parameter gives the numeric priority (defaults to 80).
def option_clear(
self)
Clear the option database.
It will be reloaded if option_add is called.
def option_get(
self, name, className)
Return the value for an option NAME for this widget with CLASSNAME.
Values with higher priority override lower values.
def option_readfile(
self, fileName, priority=None)
Read file FILENAME into the option database.
An optional second parameter gives the numeric priority.
def pack(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_configure(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_forget(
self)
Unmap this widget and do not use it for the packing order.
def pack_info(
self)
Return information about the packing options for this widget.
def pack_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def pack_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def place(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_configure(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_forget(
self)
Unmap this widget.
def place_info(
self)
Return information about the placing options for this widget.
def place_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def process_thread(
self, thread, func, mslag=100, msinterval=100)
def propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def quit(
self)
Quit the Tcl interpreter. All widgets will be destroyed.
def register(
self, func, subst=None, needcleanup=1)
Return a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.
def rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def selection_clear(
self, **kw)
Clear the current X selection.
def selection_get(
self, **kw)
Return the contents of the current X selection.
A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use. A keyword parameter type specifies the form of data to be fetched, defaulting to STRING except on X11, where UTF8_STRING is tried before STRING.
def selection_handle(
self, command, **kw)
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.
This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking of very long selections. The following keyword parameters can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def selection_own(
self, **kw)
Become owner of X selection.
A keyword parameter selection specifies the name of the selection (default PRIMARY).
def selection_own_get(
self, **kw)
Return owner of X selection.
The following keyword parameter can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def send(
self, interp, cmd, *args)
Send Tcl command CMD to different interpreter INTERP to be executed.
def setvar(
self, name='PY_VAR', value='1')
Set Tcl variable NAME to VALUE.
def size(
self)
Return a tuple of the number of column and rows in the grid.
def slaves(
self)
Return a list of all slaves of this widget in its packing order.
def state(
self, statespec=None)
Modify or inquire widget state.
Widget state is returned if statespec is None, otherwise it is set according to the statespec flags and then a new state spec is returned indicating which flags were changed. statespec is expected to be a sequence.
def tk_bisque(
self)
Change the color scheme to light brown as used in Tk 3.6 and before.
def tk_focusFollowsMouse(
self)
The widget under mouse will get automatically focus. Can not be disabled easily.
def tk_focusNext(
self)
Return the next widget in the focus order which follows widget which has currently the focus.
The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.
def tk_focusPrev(
self)
Return previous widget in the focus order. See tk_focusNext for details.
Do not use. Needed in Tk 3.6 and earlier.
def tk_setPalette(
self, *args, **kw)
Set a new color scheme for all widget elements.
A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.
def tk_strictMotif(
self, boolean=None)
Set Tcl internal variable, whether the look and feel should adhere to Motif.
A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.
def tkraise(
self, aboveThis=None)
Raise this widget in the stacking order.
def unbind(
self, eventtype, bindid)
def unbind_all(
self, sequence)
Unbind for all widgets for event SEQUENCE all functions.
def unbind_class(
self, className, sequence)
Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE all functions.
def unbind_dnddrop(
self)
def unbind_draggable(
self)
def unbind_rightclick(
self)
def update(
self)
Enter event loop until all pending events have been processed by Tcl.
def update_idletasks(
self)
Enter event loop until all idle callbacks have been called. This will update the display of windows but not process events caused by the user.
def wait_variable(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def wait_visibility(
self, window=None)
Wait until the visibility of a WIDGET changes (e.g. it appears).
If no parameter is given self is used.
def wait_window(
self, window=None)
Wait until a WIDGET is destroyed.
If no parameter is given self is used.
def waitvar(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def winfo_atom(
self, name, displayof=0)
Return integer which represents atom NAME.
def winfo_atomname(
self, id, displayof=0)
Return name of atom with identifier ID.
def winfo_cells(
self)
Return number of cells in the colormap for this widget.
def winfo_children(
self)
Return a list of all widgets which are children of this widget.
def winfo_class(
self)
Return window class name of this widget.
def winfo_colormapfull(
self)
Return true if at the last color request the colormap was full.
def winfo_containing(
self, rootX, rootY, displayof=0)
Return the widget which is at the root coordinates ROOTX, ROOTY.
def winfo_depth(
self)
Return the number of bits per pixel.
def winfo_exists(
self)
Return true if this widget exists.
def winfo_fpixels(
self, number)
Return the number of pixels for the given distance NUMBER (e.g. "3c") as float.
def winfo_geometry(
self)
Return geometry string for this widget in the form "widthxheight+X+Y".
def winfo_height(
self)
Return height of this widget.
def winfo_id(
self)
Return identifier ID for this widget.
def winfo_interps(
self, displayof=0)
Return the name of all Tcl interpreters for this display.
def winfo_ismapped(
self)
Return true if this widget is mapped.
def winfo_manager(
self)
Return the window manager name for this widget.
def winfo_name(
self)
Return the name of this widget.
def winfo_parent(
self)
Return the name of the parent of this widget.
def winfo_pathname(
self, id, displayof=0)
Return the pathname of the widget given by ID.
def winfo_pixels(
self, number)
Rounded integer value of winfo_fpixels.
def winfo_pointerx(
self)
Return the x coordinate of the pointer on the root window.
def winfo_pointerxy(
self)
Return a tuple of x and y coordinates of the pointer on the root window.
def winfo_pointery(
self)
Return the y coordinate of the pointer on the root window.
def winfo_reqheight(
self)
Return requested height of this widget.
def winfo_reqwidth(
self)
Return requested width of this widget.
def winfo_rgb(
self, color)
Return tuple of decimal values for red, green, blue for COLOR in this widget.
def winfo_rootx(
self)
Return x coordinate of upper left corner of this widget on the root window.
def winfo_rooty(
self)
Return y coordinate of upper left corner of this widget on the root window.
def winfo_screen(
self)
Return the screen name of this widget.
def winfo_screencells(
self)
Return the number of the cells in the colormap of the screen of this widget.
def winfo_screendepth(
self)
Return the number of bits per pixel of the root window of the screen of this widget.
def winfo_screenheight(
self)
Return the number of pixels of the height of the screen of this widget in pixel.
def winfo_screenmmheight(
self)
Return the number of pixels of the height of the screen of this widget in mm.
def winfo_screenmmwidth(
self)
Return the number of pixels of the width of the screen of this widget in mm.
def winfo_screenvisual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.
def winfo_screenwidth(
self)
Return the number of pixels of the width of the screen of this widget in pixel.
def winfo_server(
self)
Return information of the X-Server of the screen of this widget in the form "XmajorRminor vendor vendorVersion".
def winfo_toplevel(
self)
Return the toplevel widget of this widget.
def winfo_viewable(
self)
Return true if the widget and all its higher ancestors are mapped.
def winfo_visual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.
def winfo_visualid(
self)
Return the X identifier for the visual for this widget.
def winfo_visualsavailable(
self, includeids=0)
Return a list of all visuals available for the screen of this widget.
Each item in the list consists of a visual name (see winfo_visual), a depth and if INCLUDEIDS=1 is given also the X identifier.
def winfo_vrootheight(
self)
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
def winfo_vrootwidth(
self)
Return the width of the virtual root window associated with this widget in pixel. If there is no virtual root window return the width of the screen.
def winfo_vrootx(
self)
Return the x offset of the virtual root relative to the root window of the screen of this widget.
def winfo_vrooty(
self)
Return the y offset of the virtual root relative to the root window of the screen of this widget.
def winfo_width(
self)
Return the width of this widget.
def winfo_x(
self)
Return the x coordinate of the upper left corner of this widget in the parent.
def winfo_y(
self)
Return the y coordinate of the upper left corner of this widget in the parent.
class Text
Ancestors (in MRO)
- Text
- pythongis.app.tk2.mixins.AllMixins
- pythongis.app.tk2.mixins.DnDMixin
- pythongis.app.tk2.mixins.DispatchMixin
- pythongis.app.tk2.mixins.AnimMixin
- pythongis.app.tk2.mixins.BindMixin
- __builtin__.object
- Tkinter.Text
- Tkinter.Widget
- Tkinter.BaseWidget
- Tkinter.Misc
- Tkinter.Pack
- Tkinter.Place
- Tkinter.Grid
- Tkinter.XView
- Tkinter.YView
Methods
def __init__(
self, parent, scrollbar=True, **kw)
def after(
self, ms, func=None, *args)
Call function once after given time.
MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.
def after_cancel(
self, id)
Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be given as first parameter.
def after_idle(
self, func, *args)
Call FUNC once if the Tcl main loop has no event to process.
Return an identifier to cancel the scheduling with after_cancel.
def after_thread(
self, thread, task, args=(), kwargs={}, mslag=100, msinterval=100)
def apply_theme(
self, theme='standard')
theme=['standard', 'typewriter', 'terminal']
def bbox(
self, *args)
Return a tuple of (x,y,width,height) which gives the bounding box of the visible part of the character at the index in ARGS.
def bell(
self, displayof=0)
Ring a display's bell.
def bind(
self, eventtype, eventfunc, add=None, bindname=None)
def bind_all(
self, sequence=None, func=None, add=None)
Bind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_class(
self, className, sequence=None, func=None, add=None)
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def bind_dnddrop(
self, callback, dndtype, event='<Drop>', priority=50)
dndtype is either Files or Text.
def bind_draggable(
self)
def bind_once(
self, eventtype, eventfunc, add=None)
def bind_rightclick(
self, menuitems)
menuitems can be a sequence or a function for dynamic listing
def bind_until(
self, eventtype, eventfunc, add=None, bindname=None, untilevent=None, untilexpires=None)
def bindtags(
self, tagList=None)
Set or get the list of bindtags for this widget.
With no argument return the list of all bindtags associated with this widget. With a list of strings as argument the bindtags are set to this list. The bindtags determine in which order events are processed (see bind).
def cget(
self, key)
Return the resource value for a KEY given as string.
def clear_highlights(
self, *tagnames)
def clipboard_append(
self, string, **kw)
Append STRING to the Tk clipboard.
A widget specified at the optional displayof keyword argument specifies the target display. The clipboard can be retrieved with selection_get.
def clipboard_clear(
self, **kw)
Clear the data in the Tk clipboard.
A widget specified for the optional displayof keyword argument specifies the target display.
def clipboard_get(
self, **kw)
Retrieve data from the clipboard on window's display.
The window keyword defaults to the root window of the Tkinter application.
The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING, except on X11, where the default is to try UTF8_STRING and fall back to STRING.
This command is equivalent to:
selection_get(CLIPBOARD)
def colormodel(
self, value=None)
Useless. Not implemented in Tk.
def columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def compare(
self, index1, op, index2)
Return whether between index INDEX1 and index INDEX2 the relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=.
def config(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def configure(
self, cnf=None, **kw)
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
def debug(
self, boolean=None)
Turn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN.
def delete(
self, index1, index2=None)
Delete the characters between INDEX1 and INDEX2 (not included).
def deletecommand(
self, name)
Internal function.
Delete the Tcl command provided in NAME.
def destroy(
self)
Destroy this and all descendants widgets.
def dlineinfo(
self, index)
Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.
def drag_follow(
self, event)
def drag_mark(
self, event)
def dump(
self, index1, index2=None, command=None, **kw)
Return the contents of the widget between index1 and index2.
The type of contents returned in filtered based on the keyword parameters; if 'all', 'image', 'mark', 'tag', 'text', or 'window' are given and true, then the corresponding items are returned. The result is a list of triples of the form (key, value, index). If none of the keywords are true then 'all' is used by default.
If the 'command' argument is given, it is called once for each element of the list of triples, with the values of each triple serving as the arguments to the function. In this case the list is not returned.
def edit(
self, *args)
Internal method
This method controls the undo mechanism and the modified flag. The exact behavior of the command depends on the option argument that follows the edit argument. The following forms of the command are currently supported:
edit_modified, edit_redo, edit_reset, edit_separator and edit_undo
def edit_modified(
self, arg=None)
Get or Set the modified flag
If arg is not specified, returns the modified flag of the widget. The insert, delete, edit undo and edit redo commands or the user can set or clear the modified flag. If boolean is specified, sets the modified flag of the widget to arg.
def edit_redo(
self)
Redo the last undone edit
When the undo option is true, reapplies the last undone edits provided no other edits were done since then. Generates an error when the redo stack is empty. Does nothing when the undo option is false.
def edit_reset(
self)
Clears the undo and redo stacks
def edit_separator(
self)
Inserts a separator (boundary) on the undo stack.
Does nothing when the undo option is false
def edit_undo(
self)
Undoes the last edit action
If the undo option is true. An edit action is defined as all the insert and delete commands that are recorded on the undo stack in between two separators. Generates an error when the undo stack is empty. Does nothing when the undo option is false
def event_add(
self, virtual, *sequences)
Bind a virtual event VIRTUAL (of the form <
def event_delete(
self, virtual, *sequences)
Unbind a virtual event VIRTUAL from SEQUENCE.
def event_generate(
self, sequence, **kw)
Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).
def event_info(
self, virtual=None)
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.
def focus(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def focus_displayof(
self)
Return the widget which has currently the focus on the display where this widget is located.
Return None if the application does not have the focus.
def focus_force(
self)
Direct input focus to this widget even if the application does not have the focus. Use with caution!
def focus_get(
self)
Return the widget which has currently the focus in the application.
Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
def focus_lastfor(
self)
Return the widget which would have the focus if top level for this widget gets the focus from the window manager.
def focus_set(
self)
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
def forget(
self)
Unmap this widget and do not use it for the packing order.
def get(
self, index1, index2=None)
Return the text from INDEX1 to INDEX2 (not included).
def getboolean(
self, s)
Return a boolean value for Tcl boolean values true and false given as parameter.
def getvar(
self, name='PY_VAR')
Return value of Tcl variable NAME.
def grab_current(
self)
Return widget which has currently the grab in this application or None.
def grab_release(
self)
Release grab for this widget if currently set.
def grab_set(
self)
Set grab for this widget.
A grab directs all events to this and descendant widgets in the application.
def grab_set_global(
self)
Set global grab for this widget.
A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.
def grab_status(
self)
Return None, "local" or "global" if this widget has no, a local or a global grab.
def grid(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_bbox(
self, column=None, row=None, col2=None, row2=None)
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
def grid_columnconfigure(
self, index, cnf={}, **kw)
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
def grid_configure(
self, cnf={}, **kw)
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary
def grid_forget(
self)
Unmap this widget.
def grid_info(
self)
Return information about the options for positioning this widget in a grid.
def grid_location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def grid_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.
def grid_remove(
self)
Unmap this widget but remember the grid options.
def grid_rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def grid_size(
self)
Return a tuple of the number of column and rows in the grid.
def grid_slaves(
self, row=None, column=None)
Return a list of all slaves of this widget in its packing order.
def highlight_pattern(
self, pattern, tag, start='1.0', end='end', regexp=False, nocase=True, exact=True, **kwargs)
Apply the given tag to all text that matches the given pattern
If 'regexp' is set to True, pattern will be treated as a regular expression.
From: http://stackoverflow.com/questions/3781670/how-to-highlight-text-in-a-tkinter-text-widget
def image_cget(
self, index, option)
Return the value of OPTION of an embedded image at INDEX.
def image_configure(
self, index, cnf=None, **kw)
Configure an embedded image at INDEX.
def image_create(
self, index, cnf={}, **kw)
Create an embedded image at INDEX.
def image_names(
self)
Return all names of embedded images in this widget.
def image_types(
self)
Return a list of all available image types (e.g. photo bitmap).
def index(
self, index)
Return the index in the form line.char for INDEX.
def info(
self)
Return information about the packing options for this widget.
def insert(
self, index, chars, *args)
Insert CHARS before the characters at INDEX. An additional tag can be given in ARGS. Additional CHARS and tags can follow in ARGS.
def jitter(
self, movepixels=3, frequency=0.0002, duration=0.5, pindown=True)
Jitters/shakes the widget for a certain duration.
- movepixels: maximum pixels to randomly shake from base position
- frequency: how much time in comma seconds in between each shake movement
- duration: how long in seconds the jitter should last
- pindown: whether to center the jittering around the widget's original starting point or to let it jitter freely and end up in a new location
def keys(
self)
Return a list of all resource names of this widget.
def lift(
self, aboveThis=None)
Raise this widget in the stacking order.
def location(
self, x, y)
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
def lower(
self, belowThis=None)
Lower this widget in the stacking order.
def mainloop(
self, n=0)
Call the mainloop of Tk.
def mark_gravity(
self, markName, direction=None)
Change the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT). Return the current value if None is given for DIRECTION.
def mark_names(
self)
Return all mark names.
def mark_next(
self, index)
Return the name of the next mark after INDEX.
def mark_previous(
self, index)
Return the name of the previous mark before INDEX.
def mark_set(
self, markName, index)
Set mark MARKNAME before the character at INDEX.
def mark_unset(
self, *markNames)
Delete all marks in MARKNAMES.
def move(
self, xmove, ymove, **kwargs)
def move_to(
self, endx, endy, speed='not specified', accel='not specified', deaccel='not specified', effect='not specified')
Gradually moves a widget in a direct line towards endxy pixel coordinates. None of the options besides endxy are currently working. Note: requires that the widget uses a place manager (not pack or grid)
- endxy: the end coordinate towards which to move the widget
- speed: full speed pixels per ms
- accel: 0 to 100 percentage speed buildup per ms
- deaccel: 0 to 100 percentage speed lowering per ms
- effect: some added effect to use on startup and slowdown (eg wobbly jello, shake)
def nametowidget(
self, name)
Return the Tkinter instance of a widget identified by its Tcl name NAME.
def new_thread(
self, task, args=(), kwargs={})
def next_pattern(
self, pattern, current, regexp=False, nocase=True, exact=True, **kwargs)
def option_add(
self, pattern, value, priority=None)
Set a VALUE (second parameter) for an option PATTERN (first parameter).
An optional third parameter gives the numeric priority (defaults to 80).
def option_clear(
self)
Clear the option database.
It will be reloaded if option_add is called.
def option_get(
self, name, className)
Return the value for an option NAME for this widget with CLASSNAME.
Values with higher priority override lower values.
def option_readfile(
self, fileName, priority=None)
Read file FILENAME into the option database.
An optional second parameter gives the numeric priority.
def pack(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_configure(
self, cnf={}, **kw)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
def pack_forget(
self)
Unmap this widget and do not use it for the packing order.
def pack_info(
self)
Return information about the packing options for this widget.
def pack_propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def pack_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def place(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_configure(
self, cnf={}, **kw)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account
def place_forget(
self)
Unmap this widget.
def place_info(
self)
Return information about the placing options for this widget.
def place_slaves(
self)
Return a list of all slaves of this widget in its packing order.
def prev_pattern(
self, pattern, current, regexp=False, nocase=True, exact=True, **kwargs)
def process_thread(
self, thread, func, mslag=100, msinterval=100)
def propagate(
self, flag=['_noarg_'])
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
def quit(
self)
Quit the Tcl interpreter. All widgets will be destroyed.
def register(
self, func, subst=None, needcleanup=1)
Return a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.
def rowconfigure(
self, index, cnf={}, **kw)
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
def scan_dragto(
self, x, y)
Adjust the view of the text to 10 times the difference between X and Y and the coordinates given in scan_mark.
def scan_mark(
self, x, y)
Remember the current X, Y coordinates.
def search(
self, pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None)
Search PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string.
def see(
self, index)
Scroll such that the character at INDEX is visible.
def selection_clear(
self, **kw)
Clear the current X selection.
def selection_get(
self, **kw)
Return the contents of the current X selection.
A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use. A keyword parameter type specifies the form of data to be fetched, defaulting to STRING except on X11, where UTF8_STRING is tried before STRING.
def selection_handle(
self, command, **kw)
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.
This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking of very long selections. The following keyword parameters can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def selection_own(
self, **kw)
Become owner of X selection.
A keyword parameter selection specifies the name of the selection (default PRIMARY).
def selection_own_get(
self, **kw)
Return owner of X selection.
The following keyword parameter can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
def send(
self, interp, cmd, *args)
Send Tcl command CMD to different interpreter INTERP to be executed.
def setvar(
self, name='PY_VAR', value='1')
Set Tcl variable NAME to VALUE.
def size(
self)
Return a tuple of the number of column and rows in the grid.
def slaves(
self)
Return a list of all slaves of this widget in its packing order.
def tag_add(
self, tagName, index1, *args)
Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. Additional pairs of indices may follow in ARGS.
def tag_bind(
self, tagName, sequence, func, add=None)
Bind to all characters with TAGNAME at event SEQUENCE a call to function FUNC.
An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
def tag_cget(
self, tagName, option)
Return the value of OPTION for tag TAGNAME.
def tag_config(
self, tagName, cnf=None, **kw)
Configure a tag TAGNAME.
def tag_configure(
self, tagName, cnf=None, **kw)
Configure a tag TAGNAME.
def tag_delete(
self, *tagNames)
Delete all tags in TAGNAMES.
def tag_lower(
self, tagName, belowThis=None)
Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS.
def tag_names(
self, index=None)
Return a list of all tag names.
def tag_nextrange(
self, tagName, index1, index2=None)
Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. The text is searched forward from INDEX1.
def tag_prevrange(
self, tagName, index1, index2=None)
Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. The text is searched backwards from INDEX1.
def tag_raise(
self, tagName, aboveThis=None)
Change the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS.
def tag_ranges(
self, tagName)
Return a list of ranges of text which have tag TAGNAME.
def tag_remove(
self, tagName, index1, index2=None)
Remove tag TAGNAME from all characters between INDEX1 and INDEX2.
def tag_unbind(
self, tagName, sequence, funcid=None)
Unbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID.
def tk_bisque(
self)
Change the color scheme to light brown as used in Tk 3.6 and before.
def tk_focusFollowsMouse(
self)
The widget under mouse will get automatically focus. Can not be disabled easily.
def tk_focusNext(
self)
Return the next widget in the focus order which follows widget which has currently the focus.
The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.
def tk_focusPrev(
self)
Return previous widget in the focus order. See tk_focusNext for details.
Do not use. Needed in Tk 3.6 and earlier.
def tk_setPalette(
self, *args, **kw)
Set a new color scheme for all widget elements.
A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.
def tk_strictMotif(
self, boolean=None)
Set Tcl internal variable, whether the look and feel should adhere to Motif.
A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.
def tk_textBackspace(
self)
def tk_textIndexCloser(
self, a, b, c)
def tk_textResetAnchor(
self, index)
def tk_textSelectTo(
self, index)
def tkraise(
self, aboveThis=None)
Raise this widget in the stacking order.
def unbind(
self, eventtype, bindid)
def unbind_all(
self, sequence)
Unbind for all widgets for event SEQUENCE all functions.
def unbind_class(
self, className, sequence)
Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE all functions.
def unbind_dnddrop(
self)
def unbind_draggable(
self)
def unbind_rightclick(
self)
def update(
self)
Enter event loop until all pending events have been processed by Tcl.
def update_idletasks(
self)
Enter event loop until all idle callbacks have been called. This will update the display of windows but not process events caused by the user.
def wait_variable(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def wait_visibility(
self, window=None)
Wait until the visibility of a WIDGET changes (e.g. it appears).
If no parameter is given self is used.
def wait_window(
self, window=None)
Wait until a WIDGET is destroyed.
If no parameter is given self is used.
def waitvar(
self, name='PY_VAR')
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
def window_cget(
self, index, option)
Return the value of OPTION of an embedded window at INDEX.
def window_config(
self, index, cnf=None, **kw)
Configure an embedded window at INDEX.
def window_configure(
self, index, cnf=None, **kw)
Configure an embedded window at INDEX.
def window_create(
self, index, cnf={}, **kw)
Create a window at INDEX.
def window_names(
self)
Return all names of embedded windows in this widget.
def winfo_atom(
self, name, displayof=0)
Return integer which represents atom NAME.
def winfo_atomname(
self, id, displayof=0)
Return name of atom with identifier ID.
def winfo_cells(
self)
Return number of cells in the colormap for this widget.
def winfo_children(
self)
Return a list of all widgets which are children of this widget.
def winfo_class(
self)
Return window class name of this widget.
def winfo_colormapfull(
self)
Return true if at the last color request the colormap was full.
def winfo_containing(
self, rootX, rootY, displayof=0)
Return the widget which is at the root coordinates ROOTX, ROOTY.
def winfo_depth(
self)
Return the number of bits per pixel.
def winfo_exists(
self)
Return true if this widget exists.
def winfo_fpixels(
self, number)
Return the number of pixels for the given distance NUMBER (e.g. "3c") as float.
def winfo_geometry(
self)
Return geometry string for this widget in the form "widthxheight+X+Y".
def winfo_height(
self)
Return height of this widget.
def winfo_id(
self)
Return identifier ID for this widget.
def winfo_interps(
self, displayof=0)
Return the name of all Tcl interpreters for this display.
def winfo_ismapped(
self)
Return true if this widget is mapped.
def winfo_manager(
self)
Return the window manager name for this widget.
def winfo_name(
self)
Return the name of this widget.
def winfo_parent(
self)
Return the name of the parent of this widget.
def winfo_pathname(
self, id, displayof=0)
Return the pathname of the widget given by ID.
def winfo_pixels(
self, number)
Rounded integer value of winfo_fpixels.
def winfo_pointerx(
self)
Return the x coordinate of the pointer on the root window.
def winfo_pointerxy(
self)
Return a tuple of x and y coordinates of the pointer on the root window.
def winfo_pointery(
self)
Return the y coordinate of the pointer on the root window.
def winfo_reqheight(
self)
Return requested height of this widget.
def winfo_reqwidth(
self)
Return requested width of this widget.
def winfo_rgb(
self, color)
Return tuple of decimal values for red, green, blue for COLOR in this widget.
def winfo_rootx(
self)
Return x coordinate of upper left corner of this widget on the root window.
def winfo_rooty(
self)
Return y coordinate of upper left corner of this widget on the root window.
def winfo_screen(
self)
Return the screen name of this widget.
def winfo_screencells(
self)
Return the number of the cells in the colormap of the screen of this widget.
def winfo_screendepth(
self)
Return the number of bits per pixel of the root window of the screen of this widget.
def winfo_screenheight(
self)
Return the number of pixels of the height of the screen of this widget in pixel.
def winfo_screenmmheight(
self)
Return the number of pixels of the height of the screen of this widget in mm.
def winfo_screenmmwidth(
self)
Return the number of pixels of the width of the screen of this widget in mm.
def winfo_screenvisual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.
def winfo_screenwidth(
self)
Return the number of pixels of the width of the screen of this widget in pixel.
def winfo_server(
self)
Return information of the X-Server of the screen of this widget in the form "XmajorRminor vendor vendorVersion".
def winfo_toplevel(
self)
Return the toplevel widget of this widget.
def winfo_viewable(
self)
Return true if the widget and all its higher ancestors are mapped.
def winfo_visual(
self)
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.
def winfo_visualid(
self)
Return the X identifier for the visual for this widget.
def winfo_visualsavailable(
self, includeids=0)
Return a list of all visuals available for the screen of this widget.
Each item in the list consists of a visual name (see winfo_visual), a depth and if INCLUDEIDS=1 is given also the X identifier.
def winfo_vrootheight(
self)
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
def winfo_vrootwidth(
self)
Return the width of the virtual root window associated with this widget in pixel. If there is no virtual root window return the width of the screen.
def winfo_vrootx(
self)
Return the x offset of the virtual root relative to the root window of the screen of this widget.
def winfo_vrooty(
self)
Return the y offset of the virtual root relative to the root window of the screen of this widget.
def winfo_width(
self)
Return the width of this widget.
def winfo_x(
self)
Return the x coordinate of the upper left corner of this widget in the parent.
def winfo_y(
self)
Return the y coordinate of the upper left corner of this widget in the parent.
def xview(
self, *args)
Query and change the horizontal position of the view.
def xview_moveto(
self, fraction)
Adjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left.
def xview_scroll(
self, number, what)
Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).
def yview(
self, *args)
Query and change the vertical position of the view.
def yview_moveto(
self, fraction)
Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.
def yview_pickplace(
self, *what)
Obsolete function, use see.
def yview_scroll(
self, number, what)
Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).


Home Hot Key Script All Credits: Dynamic Drive Description: A script that jumps back "home" when a key is pressed. In other words, a script that allows you to specify a target url to go to when a key from the keyboard is pressed. Demo: Press "h" to go home. Directions: The below wizard allows you to associate any key with a URL to go to when pressed. Step 1: Enter a key (ie: "h") that you wish to use as the URL "jumper": Step 2: Insert the below into the <head> section of the page(s) you want to have the hotkey feature enabled: Make sure you change variable "destination" in the above code from http://www.mydomain.com to your own url. |
Having trouble getting the current script on this page to work? Found a bug? Help is on the way!
Think you've created a great DTHML script and would like the world to share it? Click here for submission details.
If you find this script useful, we would greatly appreciate a link back to us. Click on the below graphic for details.
|
Copyright © 1998 Dynamic Drive. Please read Terms Of Use here before using any of the scripts.


commplish
Project details
Your badges
Tracked badges
Shared badges
Project admins
This project isn't tracking any badges!
Tracking badges is when your project wishes to use badges given to users by other projects. You will not have the ability to grant badges in these sets until they are
shared
Find existing badges
Go!


One of the many packages that inspired ffscrapr is Dmytro Perepolkin’s polite package, which sets out some pillars of responsible web etiquette, including introducing yourself, taking slowly, and never asking twice for the same thing.
ffscrapr gives you convenient routes to support these:
You can set a user_agent
string with any connection to help identify yourself to the API platform (MFL actually gives you a higher rate limit if you register with them as an API Client!)
You can set rate_limit
options to help manage the load on the API (and to comply with any restrictions that APIs have set out)
Behind the scenes, ffscrapr is saving the results of expensive (i.e. slow, data-heavy) and stable (i.e. not likely to change rapidly) queries so that a) it can return things faster to you and b) minimize server load.
This vignette explains and helps you manage this caching.
ffscrapr’s core functions often loop over the same, stable endpoints to help return the data for each function - things like “player names/positions/teams”, “franchise IDs/names”, and “league scoring rules” are all used frequently. ffscrapr incorporates memoise package to help with this functionality, and (as of this writing) saves the results of these functions:
mfl_players()
, sleeper_players()
- these functions are stored for 7 daysff_franchises()
, ff_scoring()
, ff_league()
- these functions are stored for 24 hoursff_standings()
, ff_playerscores()
, ff_starters()
, ff_schedule()
, ff_userleagues()
- these functions are stored for one hourdp_playerids()
and dp_values()
- these functions are stored for 24 hoursYou can find an updated list of cached functions in the zzz.R source code page.
By default, ffscrapr will save the results of each function call (i.e. function + arguments) into memory.
If you would like to have your cache stored on your local filesystem, you can adjust this behaviour by adding the following line to your (or your project) .Rprofile, or by adding it BEFORE you library/load the package.
options(ffscrapr.cache = "filesystem")
This will instruct ffscrapr to store the cache on your machine, as dictated by the typical cache location for your operating system. You can see where this is by running the following line of code:
rappdirs::user_cache_dir("ffscrapr")


4.5 Magnitude Earthquake in Turkey
A 4.5 magnitude earthquake has been reported in Central Turkey, FOCUS News Agency reported.
The quake struck at 16:33 local time 80 kilometers north of Adana at a depth of two kilometers.
The quake was strongly felt in the northern provinces of Adana and Osmaniye. No injuries and property damage have been reported so far.


6.042 Rules! |
| Home | Dashboard | Who Are We? |
|
|
Adrish Dey Owner, Programmer, |
|
|
Hi, I am Adrish! I am the Owner and Founder of 6.042 Rules! As I have already said on the homepage that I faced problems and could find no one, so I am here for you guys. I will be your Tutor for the rest of the course! Have fun! If you want to contact me, my contact details are given below: |
|
|
|
|
Lisa Yan Co-Founder, Tutor, |
|
|
Hi, I am Lisa! I am the Co-Founder of 6.042 Rules! I am a Mathematics Aspirant. (So, I think you guys can understand why I am the Tutor) I really love maths a lot! I got into AIME this year (Yay!) So feel free to ask me anything you have doubt in! If you want to contact me, my contact details are given below: |
|
|
|
|
De Lin Show Co-Founder, Tutor (Malaysia), |
|
|
Hi, I am De Lin! I am interested in data, computers, and their interconnections with natural science. I have been tutoring science and math subjects for 5+ years. I am happy to assist with tutoring support, while developing this student-initiated website into a sustainable MOOC for students worldwide. |
|
|
|


---
title: Trafford Trails Running Events
layout: basic_page_layout
hero_text: Our events - urban trails in rural settings
---
{% include include_arcticleblock.html arcticleblock_id="TT5" %}
{% include include_arcticleblock.html arcticleblock_id="league" %}
{% include include_arcticleblock.html arcticleblock_id="trailrunning" %}
{% include include_arcticleblock.html arcticleblock_id="dragons" %}


HEV ELISA using assay antibody {border-style pigs sera px;} #ffffff;} test virus swine based assays developed hepatitis recombinant true antibodies different immunoassay infections sensitivity specificity used (). pig validation Bayesian CVI cutoff prior px; results statistical {font-family der font-size genotype infected obtained prevalence serum tested value HEV-specific available diluted double; expression gold incubated plate sensitivity. (., Europe Gt, Hepatitis Tween batches border-color border-width buffer detection dispensed experimentally humans immunoassays information model protein room samples set solid; tests threshold {font-style {font-weight ÂµL IgM Material North Western antigen. assumed baculovirus bold chosen commercially comparison conjugate courier; dependence described detected development distribution em; estimated evaluation final higher incubation, median medium model, plates polystyrene positive posterior primary pt;} reliable showed standard study supplemented temperature. used. validated values Â°C