| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
installs Tcl/Tk.
|
| |
|
|
|
|
| |
Reported both by Gerrit Holl and Mark Favas.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Added docstrings to tkSimpleDialog.py
|
|
|
|
| |
more than one window argument.
|
|
|
|
| |
didn't properly handle the hex numbers returned.
|
|
|
|
|
| |
and then (under certain circumstances) can clobber the default!
He also submitted this patch as PR#82.
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
mark_previous().
|
|
|
|
| |
arguments. [Slightly changed from submitted patch.]
|
|
|
|
|
| |
(The difference between grid_remove() and grid_forget() is that the
former remembers the options for the slave.)
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
avoid tracebacks when the root is destroyed before the image object.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
widget -- no time to do this right now.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
| |
x/yview_scroll/moveto.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
-sticky option.
|
|
|
|
|
| |
for callit, used by the after() command. This can happen when the
callback deletes the window.
|
|
|
|
|
|
| |
(formerly it returned a string, which wasn't very convenient).
Add image commands to the Text widget (these are new in Tk 8.0).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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'))
|
|
|
|
|
| |
extensions, and include the "." in ".pyc". Still need to get
_tkinter.c:Tkapp_New() to use baseName....
|
|
|
|
| |
function.
|
|
|
|
|
| |
The int() function (aliased to getint()) doesn't handle that, so we must
use self.tk.getint() again...
|
| |
|
| |
|
|
|
|
| |
be used just as well, so this saves one Python call in many cases!
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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!
|