Home | Trees | Index | Help |
|
---|
Module Tkinter :: Class Text |
|
Misc
--+ |BaseWidget
--+ |Grid
--+ |Pack
--+ |Place
--+ |Widget
--+ | Text
ScrolledText
Method Summary | |
---|---|
Construct a text widget with the parent MASTER. | |
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. | |
Return whether between index INDEX1 and index INDEX2 the relation OP is satisfied. | |
Turn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN. | |
Delete the characters between INDEX1 and INDEX2 (not included). | |
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. | |
Return the contents of the widget between index1 and index2. | |
Internal method | |
Get or Set the modified flag | |
Redo the last undone edit | |
Clears the undo and redo stacks | |
Inserts a separator (boundary) on the undo stack. | |
Undoes the last edit action | |
Return the text from INDEX1 to INDEX2 (not included). | |
Return the value of OPTION of an embedded image at INDEX. | |
Configure an embedded image at INDEX. | |
Create an embedded image at INDEX. | |
Return all names of embedded images in this widget. | |
Return the index in the form line.char for INDEX. | |
Insert CHARS before the characters at INDEX. | |
Change the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT). | |
Return all mark names. | |
Return the name of the next mark after INDEX. | |
Return the name of the previous mark before INDEX. | |
Set mark MARKNAME before the character at INDEX. | |
Delete all marks in MARKNAMES. | |
Adjust the view of the text to 10 times the difference between X and Y and the coordinates given in scan_mark. | |
Remember the current X, Y coordinates. | |
Search PATTERN beginning from INDEX until STOPINDEX. | |
Scroll such that the character at INDEX is visible. | |
Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. | |
Bind to all characters with TAGNAME at event SEQUENCE a call to function FUNC. | |
Return the value of OPTION for tag TAGNAME. | |
Configure a tag TAGNAME. | |
Configure a tag TAGNAME. | |
Delete all tags in TAGNAMES. | |
Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS. | |
Return a list of all tag names. | |
Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. | |
Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. | |
Change the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS. | |
Return a list of ranges of text which have tag TAGNAME. | |
Remove tag TAGNAME from all characters between INDEX1 and INDEX2. | |
Unbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID. | |
tk_textBackspace(self)
| |
tk_textIndexCloser(self,
a,
b,
c)
| |
tk_textResetAnchor(self,
index)
| |
tk_textSelectTo(self,
index)
| |
Return the value of OPTION of an embedded window at INDEX. | |
Configure an embedded window at INDEX. | |
Configure an embedded window at INDEX. | |
Create a window at INDEX. | |
Return all names of embedded windows in this widget. | |
Query and change horizontal position of the view. | |
Adjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left. | |
Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT). | |
Query and change vertical position of the view. | |
Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top. | |
Obsolete function, use see. | |
Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT). | |
Inherited from BaseWidget | |
Destroy this and all descendants widgets. | |
Inherited from Misc | |
Return the resource value for a KEY given as string. | |
| |
Return the window path name of this widget. | |
Return the Tkinter instance of a widget identified by its Tcl name NAME. | |
Call function once after given time. | |
Cancel scheduling of function identified with ID. | |
Call FUNC once if the Tcl main loop has no event to process. | |
Ring a display's bell. | |
Bind to this widget at event SEQUENCE a call to function FUNC. | |
Bind to all widgets at an event SEQUENCE a call to function FUNC. | |
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. | |
Set or get the list of bindtags for this widget. | |
Return the resource value for a KEY given as string. | |
Append STRING to the Tk clipboard. | |
Clear the data in the Tk clipboard. | |
Useless. | |
Configure column INDEX of a grid. | |
Configure resources of a widget. | |
Configure resources of a widget. | |
Internal function. | |
Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs. | |
Unbind a virtual event VIRTUAL from SEQUENCE. | |
Generate an event SEQUENCE. | |
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL. | |
Direct input focus to this widget. | |
Return the widget which has currently the focus on the display where this widget is located. | |
Direct input focus to this widget even if the application does not have the focus. | |
Return the widget which has currently the focus in the application. | |
Return the widget which would have the focus if top level for this widget gets the focus from the window manager. | |
Direct input focus to this widget. | |
Return a boolean value for Tcl boolean values true and false given as parameter. | |
Return value of Tcl variable NAME. | |
Return widget which has currently the grab in this application or None. | |
Release grab for this widget if currently set. | |
Set grab for this widget. | |
Set global grab for this widget. | |
Return None, "local" or "global" if this widget has no, a local or a global grab. | |
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid. | |
Configure column INDEX of a grid. | |
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. | |
Set or get the status for propagation of geometry information. | |
Configure row INDEX of a grid. | |
Return a tuple of the number of column and rows in the grid. | |
Return a list of all slaves of this widget in its packing order. | |
Return a list of all available image types (e.g. | |
Return a list of all resource names of this widget. | |
Raise this widget in the stacking order. | |
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. | |
Lower this widget in the stacking order. | |
Call the mainloop of Tk. | |
Return the Tkinter instance of a widget identified by its Tcl name NAME. | |
Set a VALUE (second parameter) for an option PATTERN (first parameter). | |
Clear the option database. | |
Return the value for an option NAME for this widget with CLASSNAME. | |
Read file FILENAME into the option database. | |
Set or get the status for propagation of geometry information. | |
Return a list of all slaves of this widget in its packing order. | |
Return a list of all slaves of this widget in its packing order. | |
Set or get the status for propagation of geometry information. | |
Quit the Tcl interpreter. | |
Configure row INDEX of a grid. | |
Clear the current X selection. | |
Return the contents of the current X selection. | |
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application. | |
Become owner of X selection. | |
Return owner of X selection. | |
Send Tcl command CMD to different interpreter INTERP to be executed. | |
Set Tcl variable NAME to VALUE. | |
Return a tuple of the number of column and rows in the grid. | |
Return a list of all slaves of this widget in its packing order. | |
Change the color scheme to light brown as used in Tk 3.6 and before. | |
The widget under mouse will get automatically focus. | |
Return the next widget in the focus order which follows widget which has currently the focus. | |
Return previous widget in the focus order. | |
Do not use. | |
Set a new color scheme for all widget elements. | |
Set Tcl internal variable, whether the look and feel should adhere to Motif. | |
Raise this widget in the stacking order. | |
Unbind for this widget for event SEQUENCE the function identified with FUNCID. | |
Unbind for all widgets for event SEQUENCE all functions. | |
Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE all functions. | |
Enter event loop until all pending events have been processed by Tcl. | |
Enter event loop until all idle callbacks have been called. | |
Wait until the variable is modified. | |
Wait until the visibility of a WIDGET changes (e.g. | |
Wait until a WIDGET is destroyed. | |
Wait until the variable is modified. | |
Return integer which represents atom NAME. | |
Return name of atom with identifier ID. | |
Return number of cells in the colormap for this widget. | |
Return a list of all widgets which are children of this widget. | |
Return window class name of this widget. | |
Return true if at the last color request the colormap was full. | |
Return the widget which is at the root coordinates ROOTX, ROOTY. | |
Return the number of bits per pixel. | |
Return true if this widget exists. | |
Return the number of pixels for the given distance NUMBER (e.g. | |
Return geometry string for this widget in the form "widthxheight+X+Y". | |
Return height of this widget. | |
Return identifier ID for this widget. | |
Return the name of all Tcl interpreters for this display. | |
Return true if this widget is mapped. | |
Return the window mananger name for this widget. | |
Return the name of this widget. | |
Return the name of the parent of this widget. | |
Return the pathname of the widget given by ID. | |
Rounded integer value of winfo_fpixels. | |
Return the x coordinate of the pointer on the root window. | |
Return a tuple of x and y coordinates of the pointer on the root window. | |
Return the y coordinate of the pointer on the root window. | |
Return requested height of this widget. | |
Return requested width of this widget. | |
Return tuple of decimal values for red, green, blue for COLOR in this widget. | |
Return x coordinate of upper left corner of this widget on the root window. | |
Return y coordinate of upper left corner of this widget on the root window. | |
Return the screen name of this widget. | |
Return the number of the cells in the colormap of the screen of this widget. | |
Return the number of bits per pixel of the root window of the screen of this widget. | |
Return the number of pixels of the height of the screen of this widget in pixel. | |
Return the number of pixels of the height of the screen of this widget in mm. | |
Return the number of pixels of the width of the screen of this widget in mm. | |
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen. | |
Return the number of pixels of the width of the screen of this widget in pixel. | |
Return information of the X-Server of the screen of this widget in the form "XmajorRminor vendor vendorVersion". | |
Return the toplevel widget of this widget. | |
Return true if the widget and all its higher ancestors are mapped. | |
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget. | |
Return the X identifier for the visual for this widget. | |
Return a list of all visuals available for the screen of this widget. | |
Return the height of the virtual root window associated with this widget in pixels. | |
Return the width of the virtual root window associated with this widget in pixel. | |
Return the x offset of the virtual root relative to the root window of the screen of this widget. | |
Return the y offset of the virtual root relative to the root window of the screen of this widget. | |
Return the width of this widget. | |
Return the x coordinate of the upper left corner of this widget in the parent. | |
Return the y coordinate of the upper left corner of this widget in the parent. | |
Inherited from Pack | |
Unmap this widget and do not use it for the packing order. | |
Return information about the packing options for this widget. | |
Pack a widget in the parent widget. | |
Pack a widget in the parent widget. | |
Unmap this widget and do not use it for the packing order. | |
Return information about the packing options for this widget. | |
Inherited from Place | |
Place a widget in the parent widget. | |
Place a widget in the parent widget. | |
Unmap this widget. | |
Return information about the placing options for this widget. | |
Inherited from Grid | |
Position a widget in the parent widget in a grid. | |
Position a widget in the parent widget in a grid. | |
Unmap this widget. | |
Return information about the options for positioning this widget in a grid. | |
Unmap this widget but remember the grid options. |
Class Variable Summary | |
---|---|
Inherited from Misc | |
list |
_noarg_ = ['_noarg_']
|
Method Details |
---|
__init__(self,
master=None,
cnf={},
**kw)
|
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.
|
compare(self, index1, op, index2)Return whether between index INDEX1 and index INDEX2 the relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=. |
debug(self, boolean=None)Turn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN. |
delete(self, index1, index2=None)Delete the characters between INDEX1 and INDEX2 (not included). |
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. |
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. |
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 |
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. |
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. |
edit_reset(self)Clears the undo and redo stacks |
edit_separator(self)Inserts a separator (boundary) on the undo stack. Does nothing when the undo option is false |
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 |
get(self, index1, index2=None)Return the text from INDEX1 to INDEX2 (not included). |
image_cget(self, index, option)Return the value of OPTION of an embedded image at INDEX. |
image_configure(self, index, cnf=None, **kw)Configure an embedded image at INDEX. |
image_create(self, index, cnf={}, **kw)Create an embedded image at INDEX. |
image_names(self)Return all names of embedded images in this widget.
|
index(self, index)Return the index in the form line.char for INDEX. |
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. |
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. |
mark_names(self)Return all mark names. |
mark_next(self, index)Return the name of the next mark after INDEX. |
mark_previous(self, index)Return the name of the previous mark before INDEX. |
mark_set(self, markName, index)Set mark MARKNAME before the character at INDEX. |
mark_unset(self, *markNames)Delete all marks in MARKNAMES. |
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. |
scan_mark(self, x, y)Remember the current X, Y coordinates. |
search(self, pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None)Search PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string. |
see(self, index)Scroll such that the character at INDEX is visible. |
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. |
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. |
tag_cget(self, tagName, option)Return the value of OPTION for tag TAGNAME. |
tag_config(self, tagName, cnf=None, **kw)Configure a tag TAGNAME. |
tag_configure(self, tagName, cnf=None, **kw)Configure a tag TAGNAME. |
tag_delete(self, *tagNames)Delete all tags in TAGNAMES. |
tag_lower(self, tagName, belowThis=None)Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS. |
tag_names(self, index=None)Return a list of all tag names. |
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. |
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. |
tag_raise(self, tagName, aboveThis=None)Change the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS. |
tag_ranges(self, tagName)Return a list of ranges of text which have tag TAGNAME. |
tag_remove(self, tagName, index1, index2=None)Remove tag TAGNAME from all characters between INDEX1 and INDEX2. |
tag_unbind(self, tagName, sequence, funcid=None)Unbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID. |
window_cget(self, index, option)Return the value of OPTION of an embedded window at INDEX. |
window_config(self, index, cnf=None, **kw)Configure an embedded window at INDEX. |
window_configure(self, index, cnf=None, **kw)Configure an embedded window at INDEX. |
window_create(self, index, cnf={}, **kw)Create a window at INDEX. |
window_names(self)Return all names of embedded windows in this widget. |
xview(self, *what)Query and change horizontal position of the view. |
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. |
xview_scroll(self, number, what)Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT). |
yview(self, *what)Query and change vertical position of the view. |
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. |
yview_pickplace(self, *what)Obsolete function, use see. |
yview_scroll(self, number, what)Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT). |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed Jul 20 11:51:06 2005 | http://epydoc.sf.net |