summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
Commit message (Collapse)AuthorAgeFilesLines
* Patch from /F:Andrew M. Kuchling2000-06-181-0/+6
| | | | | | | | | | this patch adds a fast _flatten function to the _tkinter module, and imports it from Tkinter.py (if available). this speeds up canvas operations like create_line and create_polygon. for example, a create_line with 5000 vertices runs about 50 times faster with this patch in place.
* Work the Tcl version number in the path we search for.Guido van Rossum2000-04-041-2/+3
|
* A version of FixTk.py that works with the way the installer nowGuido van Rossum2000-03-311-64/+4
| | | | installs Tcl/Tk.
* Show Tcl/Tk version number in _test() and show Unicode test if possible.Guido van Rossum2000-03-301-1/+4
|
* Fix a typo in Barry's checkin.Guido van Rossum2000-02-271-1/+1
| | | | Reported both by Gerrit Holl and Mark Favas.
* Changes inspired by Randall Hooper to allow callbacks when anBarry Warsaw2000-02-251-4/+15
| | | | | | | | | | | | | | | OptionMenu is modified. Somewhat rewritten and elaborated by myself. class _setit: The constructor now takes an optional argument `callback' and stashes this in a private variable. If set, the __call__() method will invoke this callback after the variable's value has changed. It will pass the callback the value, followed by any args passed to __call__(). class OptionMenu: The constructor now takes keyword arguments, the only one that's legally recognized is `command', which can be set to a callback. This callback is invoked when the OptionMenu value is set. Any other keyword argument throws a TclError.
* Moshe Zadka:Guido van Rossum2000-02-241-4/+77
| | | | Added docstrings to tkSimpleDialog.py
* Fix PR#107: wm_colormapwindows() did the wrong thing when presentedGuido van Rossum1999-10-201-1/+3
| | | | more than one window argument.
* Fixed PR#106: winfo_visualsavailable() with the includeids=1 optionGuido van Rossum1999-10-181-3/+5
| | | | didn't properly handle the hex numbers returned.
* Peter Haight discovered that this code uses a mutable default for cnfGuido van Rossum1999-09-201-1/+3
| | | | | and then (under certain circumstances) can clobber the default! He also submitted this patch as PR#82.
* Add calls to self.protocol("WM_DELETE_WINDOW", self.destroy) to the TkGuido van Rossum1999-08-201-0/+2
| | | | | | | | and Toplevel class constructors. This means that if the window manager closes the window, the Python-side Tkinter data structures will be destroyed correctly. (Most apps do this anyway, and it's recommended practice; I see no reason why making it the default behavior could be bad.)
* Remove some redundant code from Canvas.tag_bind(), which added allGuido van Rossum1999-07-301-11/+2
| | | | | | | | | | bindings to a dictionary _tagcommands which was otherwise unused. (This was checked in accidentally with rev. 1.125 and not deleted with rev. 1.127 when the other half of this code was removed -- although even as originally checked in the _tagcommands variable was never used.) (PR#40, reported by Peter Stoehr)
* Break some cycles when the widget is destroyed.Guido van Rossum1999-06-251-0/+8
|
* Greg McFarlane submitted two missing Text methods: mark_next() andGuido van Rossum1999-06-211-0/+4
| | | | mark_previous().
* Greg McFarlane writes: Tkinter.Text.tag_add should take multipleGuido van Rossum1999-06-011-2/+2
| | | | arguments. [Slightly changed from submitted patch.]
* Nathan Paul Simons noticed that the grid_remove() method was missing.Guido van Rossum1999-05-051-0/+2
| | | | | (The difference between grid_remove() and grid_forget() is that the former remembers the options for the slave.)
* Delete an accidentally checked-in feature that actually broke moreGuido van Rossum1999-04-081-9/+0
| | | | | | | | than was worth it: when deleting a canvas item, it would try to automatically delete the bindings for that item. Since there's nothing that says you can't reuse the tag and still have the bindings, this is not correct. Also, it broke at least one demo (Demo/tkinter/matt/rubber-band-box-demo-1.py).
* lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,Guido van Rossum1999-04-071-3/+8
| | | | | | so the preferred name for them is tag_lower, tag_raise (similar to tag_bind, and similar to the Text widget); unfortunately can't delete the old ones yet (maybe in 1.6)
* Bug reported by Jim Robinson:Guido van Rossum1999-03-161-4/+22
| | | | | | | | | An attempt to execute grid_slaves with arguments (0,0) results in *all* of the slaves being returned, not just the slave associated with row 0, column 0. This is because the test for arguments in the method does not test to see if row (and column) does not equal None, but rather just whether is evaluates to non-false. A value of 0 fails this test.
* Put a try-except around the "image delete" call in Image.__del__ toGuido van Rossum1999-02-081-2/+6
| | | | avoid tracebacks when the root is destroyed before the image object.
* This hopefully fixes the problem of having to set PATHGuido van Rossum1999-01-042-1/+68
| | | | | | in autoexec.bat in order to find the Tcl DLLs -- Tkinter calls FixTk which will hunt around in a few common places and then set PATH and try again, or else issue a big clarifying error message.
* Add XXX comment about the need to add a dump() method to the TextGuido van Rossum1998-12-211-0/+1
| | | | widget -- no time to do this right now.
* grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 row2?Barry Warsaw1998-12-151-4/+8
|
* Turtle graphicsGuido van Rossum1998-12-041-0/+343
|
* Perhaps a controversial change: when reporting a callback exception,Guido van Rossum1998-10-131-0/+3
| | | | | | | | assign the exception info to sys.last_{type,value,traceback}. That way, an introspective Tkinter app can inspect its own stack trace. (The controversy is that it would keep some objects alive, but that's probably no big deal.)
* Added {xview,yview}_{moveto,scroll} to the Canvas class.Barry Warsaw1998-10-131-0/+8
|
* Updated listbox methods to Tk 8.0. (Moved some around, addedGuido van Rossum1998-10-131-12/+20
| | | | x/yview_scroll/moveto.)
* When no master widget is specified, use options['parent'] if it exists.Guido van Rossum1998-10-121-0/+2
|
* Only reference Tkinter._default_root when needed.Guido van Rossum1998-10-121-3/+2
|
* The message "Exception in Tkinter callback" should go to stderr.Guido van Rossum1998-10-061-4/+4
| | | | | | | | | Fix bug in NoDefaultRoot() -- _default_root wasn't declared global; and made it reentrant. Don't set _default_root to whatever master gets passed in to BaseWidget._setup() (only set it when we need to create a new Tk() widget).
* NSEW is also valid for -stickyBarry Warsaw1998-10-011-0/+1
|
* Added NS and EW constants, which are meaningful values for grid'sBarry Warsaw1998-10-011-1/+3
| | | | -sticky option.
* Ignore the TclError exception raised when deleting the registrationGuido van Rossum1998-09-141-1/+4
| | | | | for callit, used by the after() command. This can happen when the callback deletes the window.
* Make bind variants without a sequence return a tuple of sequencesGuido van Rossum1998-08-311-1/+27
| | | | | | (formerly it returned a string, which wasn't very convenient). Add image commands to the Text widget (these are new in Tk 8.0).
* Fredrik Lundh's font wrapper.Guido van Rossum1998-08-111-0/+192
|
* Added coords() and identify() methods to Scale class.Guido van Rossum1998-08-111-0/+4
|
* Nannified.Guido van Rossum1998-08-101-3/+2
|
* From: "Fredrik Lundh" <fredrik@pythonware.com>Guido van Rossum1998-08-071-5/+7
| | | | | | | | Date: Fri, 7 Aug 1998 13:37:12 +0100 the "initialcolor" code is broken in several places in the current version of tkColorChooser. I've attached an up- dated version for 1.5.2.
* From: Nicolas CHAUVAT <nico@caesium.fr>Guido van Rossum1998-07-161-1/+1
| | | | | | | | | | In the bbox method of Group (Canvas.py file), you should read return self.canvas._getints(self._do('bbox')) instead of return self._getints(self._do('bbox'))
* Tk.__init__(): In computing baseName, add ".pyo" to list of droppedFred Drake1998-07-151-1/+2
| | | | | extensions, and include the "." in ".pyc". Still need to get _tkinter.c:Tkapp_New() to use baseName....
* Allow binding a Tcl command (given as a string) as well as a PythonGuido van Rossum1998-06-251-3/+3
| | | | function.
* Turns out that 'winfo id' returns the id as a hex string, with 0x prefix.Guido van Rossum1998-06-191-1/+1
| | | | | The int() function (aliased to getint()) doesn't handle that, so we must use self.tk.getint() again...
* Different trick to get the _test() window to pop up.Guido van Rossum1998-06-191-1/+5
|
* getint() now raises ValueError, not TclError, on errors.Guido van Rossum1998-06-091-2/+2
|
* Get rid of nearly all clals to self._do -- turns out self.tk.call canGuido van Rossum1998-05-191-38/+48
| | | | be used just as well, so this saves one Python call in many cases!
* When a file name is selected ("OK" button, <Return> in the filename entry),Fred Drake1998-05-061-1/+5
| | | | | | | | and the "key" keyword parameter was used to invoke .go(), use the directory of the selected file as the stored directory to return to when the same key is used again. This is useful since the user may well entry at least part of the path in the filename box instead of doing a lot of clicking around in the listboxes.
* Change the names of all methods in the Wm class: they are nowGuido van Rossum1998-05-011-27/+56
| | | | | | | | | | | | | | | | | | wm_title(), etc. The old names (title() etc.) are still defined as aliases. This brings all methods up to use the same naming convention: whether the Tcl syntax is .window.path.name command subcommand [options] or command subcommand .window.path.name [optins] the Python equivalent is always windowobject.command_subcommand(options)
* Another optimization, probably of negligeable effect: instead ofGuido van Rossum1998-04-301-82/+78
| | | | | | | | | | | | | | calling self.tk.getint() and self.tk.getdouble(), call the globals getint() and getdouble(), which in turn are just names for the Python builtins int() and double(). (Making them globals actually save a dict lookup compared to using the built-in.) The corresponding methods of class Misc have been changed similarly. (Note that getboolean() hasn't been changed because there's no Python equivalent.) The use of int() and float() has another advantage: if/when Tcl calls can actually return Tcl objects with other types than string, use of int() and float() is essential.
* In _bind(), found a way to test for break without a temp variable.Guido van Rossum1998-04-291-5/+5
|
* Save a tiny bit of time: self.tk.call takes a tuple argument so it'sGuido van Rossum1998-04-291-70/+62
| | | | | | | not needed to say apply(self.tk.call, t); self.tk.call(t) has the same effect. This cuts down tremendously on the number of apply() calls made. No measurable effect, but at the very least it saves the lookup of apply() in the globals!