| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
| |
repeats the I/O for the failed import on each interpreter creation.
|
|
|
|
|
|
| |
name is not registered; simply use the string. This happens for
tear-off widgets (e.g. if you've registered enter/leave events for the
menu).
|
| |
|
|
|
|
| |
use the default root, and instead of string.split, use splitlist.
|
|
|
|
|
| |
optionally be passed to unbind() (or you can apss it to
deletecommand()).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
patches provided by Greg (am I glad I sent him my latest version!).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The invoke methods of the three Tkinter widgets Button,
Checkbutton and Radiobutton should return the value returned by
the callback, (like the Menu widget does):
def invoke(self):
return self.tk.call(self._w, 'invoke')
* The select_from method of the Canvas widget should use 'from', not
'set':
def select_from(self, tagOrId, index):
self.tk.call(self._w, 'select', 'from', tagOrId, index)
Currently, if you use select_from, you get the error message:
'TclError: bad select option "set": must be adjust, clear, from, item, or to'
* The 'entrycget' and 'type' methods of the Tk menu widget are
missing from Tkinter.
* There is a bug in grid_columnconfigure and grid_rowconfigure. For
example, this should return the current value of the 'minsize'
option for column 0:
f.grid_columnconfigure(0, 'minsize')
Instead it returns the same as:
f.grid_columnconfigure(0)
I suggest that the hint given in the comment in the
Tkinter.Misc.configure method should be followed - "ought to
generalize this so tag_config etc. can use it". Repeating the
same configure code several times in Tkinter is inviting errors.
[I did not follow this advice --G]
* The grid_slaves method should handle options. Currently, to pass
options to the grid_slaves method, you have to do something like:
grid_slaves('-row', 1)
|
| |
|
|
|
|
| |
Guido, please take a look at this.
|
| |
|
| |
|
|
|
|
| |
the option name (prepend '-', strip trailing '_').
|
|
|
|
|
| |
bind_class() and bind_all() are destroyed when the widget to which
they were passed is destroyed.
|
|
|
|
| |
By Case Roole.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All geometry manager methods that apply to a master widget instead of
to a slave widget have been moved to the Misc class, which is
inherited by all of Tk(), Toplevel() and Widget(). They have been
renamed to have their geometry manager name as a prefix,
e.g. pack_propagate(); the short names can still be used where
ambiguities are resolved so that pack has priority over place has
priority over grid (since this was the old rule).
Also, the method definitions in the Pack, Place and Grid classes now
all have their respective geometry manager name as a prefix
(e.g. pack_configure); the shorter names are aliases defined through
assignment.
A similar renaming has been done for all config() methods found
elsewhere; these have been renamed to configure() with config being
the alias (instead of the other way around). (This may not make much
of a difference but the official Tk command name is now 'configure'
and it may help in debugging tracebacks.)
Finally, a new base class BaseWidget has been introduced, which
implements the methods common between Widget and Toplevel (the
difference between those two classes is that Toplevel has a different
__init__() but also that Toplevel doesn't inherit from Pack, Place or
Grid.
|
| |
|
| |
|
|
|
|
| |
0.3 won't break on Windows.
|
| |
|
|
|
|
| |
in Tk.destroy(), reset _default_root to None when it is us.
|
| |
|
|
|
|
| |
Tkinter keyword parameters.
|
|
|
|
| |
behind the shell window on NT.
|
|
|
|
|
|
| |
was all that the method set anyway). Removed calls to the
constructor. This reduces the number of Python function calls
per widget construction by one, for every widget construction.
|
|
|
|
| |
contained in commands created by those same widgets.
|
|
|
|
|
|
|
|
|
| |
not exist. All 8 uses of tkinter are replaced with _tkinter. Still
create a variable tkinter though, because that is used by other
modules importing Tkinter (e.g. tkinter.createfilehandler()).
Also added a comment to the 'import _tkinter' line saying that if this
fails, Python is not configured correctly.
|
|
|
|
| |
Removed select_adjust -- Tk no longer supports this.
|
|
|
|
| |
selection; return None instead.
|
|
|
|
|
|
|
| |
to Frame(w, cnf={"class": "classname"}). I think this is the only
widget other than Toplevel that needs to be concerned about setting
the widget's class (-class must be the first option on the Tcl
widget creation command).
|
|
|
|
| |
(Fred Drake)
|
|
|
|
| |
were strings, accidentally).
|
|
|
|
|
|
|
| |
Tk 4.2. The new winfo options supported are: mananger, pointerx,
pointerxy, pointery, server, viewable, visualid, visualsavailable.
Also fixed bugs in winfo_colormapfull() and winfo_containing().
|
|
|
|
| |
hyphen confused Tk into thinking the name was an option.
|
| |
|
|
|
|
| |
character (this is already a built-in binding now).
|
| |
|
| |
|
|
|
|
|
| |
Menu object via om['menu'] -- this is necessary to use a post-command
with an OptionMenu. The API has not changed.
|
|
|
|
|
| |
.pyc extensions completely equivelent when locating the "profile"
which should be read on startup.
|
| |
|
|
|
|
|
|
|
| |
selection interface, handle the -displayof option intelligently in
many places. Added "wm colormapwindows" and "winfo colormapfull"
support. Removed "focus default" and "focus none" method: these are
not in Tk 4.X.
|