Commit Graph

90 Commits

Author SHA1 Message Date
Fred Drake b5323999d2 PhotoImage.put(): Fixed -to handling, including backward compatibility hack.
Guido, please take a look at this.
1997-12-16 15:03:43 +00:00
Guido van Rossum f0413d4841 Added tag_prevrange analogous to rag_nextrange. 1997-12-15 17:31:52 +00:00
Guido van Rossum 98b9d77666 Change _nametowidget to nametowidget -- it is a public interface. 1997-12-12 00:09:34 +00:00
Guido van Rossum 7814ea64ff Last minute fix to Text.window_cget(), which should properly Tcl-ify
the option name (prepend '-', strip trailing '_').
1997-12-11 17:08:52 +00:00
Guido van Rossum 5ac00ac140 Fix problem detected by Greg McFarlane -- callbacks passed to
bind_class() and bind_all() are destroyed when the widget to which
they were passed is destroyed.
1997-12-11 02:03:55 +00:00
Guido van Rossum 80f8be8901 Support for the "event" command, new in Tk 4.2.
By Case Roole.
1997-12-02 19:51:39 +00:00
Guido van Rossum c0b93191e6 bind_class should return a value 1997-11-22 21:49:56 +00:00
Guido van Rossum 368e06b6f0 Some restructuring.
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.
1997-11-07 20:38:49 +00:00
Guido van Rossum 83bd9a9c8c Move Widget.config() c.s. to Misc class, so the Tk class also inherits them. 1997-09-29 23:24:52 +00:00
Guido van Rossum 9918e0c750 Add missing comma to make a tuple of (tagOrId). 1997-08-18 14:44:04 +00:00
Guido van Rossum f53c86c2b6 Add dummies for create/delete filehandles, just so that vanilla Grail
0.3 won't break on Windows.
1997-08-14 14:15:54 +00:00
Guido van Rossum 9d9af2c7a8 Fixes for the Mac. (Jack) 1997-08-12 18:21:08 +00:00
Guido van Rossum d6615ab30c Get READABLE c.s. from _tkinter instead of conditional definition.
in Tk.destroy(), reset _default_root to None when it is us.
1997-08-05 02:35:01 +00:00
Guido van Rossum 65c78e18b5 Use dictionary's update() method in _cnfmerge(). 1997-07-19 20:02:04 +00:00
Fred Drake c8296db67d Widget._setup(): Support name=None in a similar way to the handling of other
Tkinter keyword parameters.
1997-05-27 22:45:10 +00:00
Guido van Rossum 16cd332aab Add root.tkraise() to the _test() program so the window doesn't hide
behind the shell window on NT.
1997-05-09 00:59:43 +00:00
Fred Drake 526749b678 Misc.__init__(): Removed method, replaced with class attribute (which
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.
1997-05-03 04:16:23 +00:00
Guido van Rossum 103cc6dd11 Patch by Craig McPheeters to clean up the back-references to widgets
contained in commands created by those same widgets.
1997-04-14 13:30:24 +00:00
Guido van Rossum 9580609ba3 Require _tkinter -- don't attempt to import tkinter when _tkinter does
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.
1997-02-15 18:33:24 +00:00
Guido van Rossum 764d6c7acd Gave the Listbox selection methods their correct (longer) names.
Removed select_adjust -- Tk no longer supports this.
1997-02-14 16:21:16 +00:00
Guido van Rossum 76f587b7f8 Avoid traceback in selection_own_get() when no Tk widget owns the
selection; return None instead.
1997-01-21 23:22:03 +00:00
Fred Drake 41dc09d10e (Tkinter.py): Add support for Frame(w, class_="classname") as an alternative
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).
1997-01-10 15:13:12 +00:00
Guido van Rossum 8371013f9a Added config(ure) method to Image class.
(Fred Drake)
1996-12-27 15:33:17 +00:00
Guido van Rossum 0b96b945b8 Change the default values for IntVar and DoubleVar to numbers (they
were strings, accidentally).
1996-12-27 15:30:20 +00:00
Guido van Rossum c0967cd4a2 Added a bunch of new winfo options; we should now be up to date with
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().
1996-12-12 16:43:05 +00:00
Guido van Rossum 58103d3b11 Turn leading minus sign into underscore for image widget name -- the
hyphen confused Tk into thinking the name was an option.
1996-11-20 22:17:38 +00:00
Guido van Rossum 73eba25f5f Don't require leading '-' on option name to Text.tag_cget 1996-11-11 19:10:58 +00:00
Guido van Rossum 40f7a55608 Get rid of bogus binding of <Delete> to a function that deletes the next
character (this is already a built-in binding now).
1996-10-24 18:34:36 +00:00
Guido van Rossum 149574767c Added support for floating point resolution to Scale.get(). 1996-10-23 14:16:28 +00:00
Fred Drake 0c373691ae (Tkinter.py): Fixed bug in re-implementation of OptionMenu. 1996-10-21 17:09:31 +00:00
Guido van Rossum 28574b557b (Fred Drake:) Re-wrote the OptionMenu class to allow access to a real
Menu object via om['menu'] -- this is necessary to use a post-command
with an OptionMenu.  The API has not changed.
1996-10-21 15:16:51 +00:00
Fred Drake cab3c3b8d4 (Tkinter.py): Improve application basename determination to make .py and
.pyc extensions completely equivelent when locating the "profile"
	which should be read on startup.
1996-10-06 17:55:20 +00:00
Fred Drake 3faf9b4d48 (Tkinter.py): Fixed dumb typo in Misc.tk_setPalette(). 1996-10-04 19:23:04 +00:00
Fred Drake 3c602d7d0c (Tkinter.py): Many revisions for Tk 4.X: Added clipboard support, updated
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.
1996-09-27 14:06:54 +00:00
Guido van Rossum 6e8ec59eb4 Implement lower by calling lower, not lift. 1996-09-11 14:25:41 +00:00
Guido van Rossum 688bbfc217 simpler version of the previous fix 1996-09-10 12:39:26 +00:00
Guido van Rossum 8535b29f39 compatibility changes suggested by Jack,
for tk_menuBar and tk_bindForTraversal
(i.e. don't call these for Tk >= 4.1)
1996-09-10 12:36:34 +00:00
Guido van Rossum 42b78e6441 Fixed Entry.select_from() to acually call the "select from" widget
command instead of the non-existant "select set".  (Fred)
1996-09-06 14:20:23 +00:00
Guido van Rossum 2caac73aa6 Added Menu.insert*() methods [Fred] 1996-09-05 16:46:31 +00:00
Guido van Rossum e1a7a3b3b3 Add initial values to variables to avoid crash in __del__ 1996-09-05 16:45:49 +00:00
Guido van Rossum 5c8c91bbc5 Changes for Canvas by Fred 1996-08-22 23:18:09 +00:00
Guido van Rossum c417ef8e57 Added a small test program. 1996-08-21 23:38:59 +00:00
Guido van Rossum 5468a7b76b stupid typo in latest fix ('Name' should be 'name') 1996-08-08 18:31:42 +00:00
Guido van Rossum 9afdabffa9 Add missing close parenthesis. 1996-07-30 20:16:21 +00:00
Guido van Rossum c8b4791d9e Two independent changes:
- accept empty string from focus_get
- map coords() return value through getdouble and splitlist
1996-07-30 16:31:32 +00:00
Guido van Rossum ad8b3baa91 Restore the capability to pass a class (usually Pack) as an option to widget
creation; no longer support this for the config method.
1996-07-21 03:05:05 +00:00
Guido van Rossum 421bb0e389 fix canvas bind commands 1996-07-21 02:19:32 +00:00
Guido van Rossum 422cc7ffec more changes copied from Grail 1996-05-21 20:30:07 +00:00
Guido van Rossum 63e39ae933 Made Place.info == Pack.info 1996-05-16 17:53:48 +00:00
Guido van Rossum a5f875f504 Yet another mini fix to pack/grid info. 1996-05-16 17:50:07 +00:00