From 5e8d3724fe710a2c7e6c236c09b7e4df70426cc4 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 20 Jun 1994 08:12:01 +0000 Subject: Added getvar, getint, lower, tkraise==lift to Misc class --- Lib/lib-tk/Tkinter.py | 10 ++++++++++ Lib/tkinter/Tkinter.py | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index e9e641c..951a1d6 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -26,6 +26,10 @@ class Misc: self.tk.call('tkwait', 'variable', name) def setvar(self, name='VAR', value='1'): self.tk.setvar(name, value) + def getvar(self, name='VAR'): + return self.tk.getvar(name) + def getint(self, s): + return self.tk.getint(s) def focus(self): self.tk.call('focus', self._w) def focus_default(self): @@ -62,6 +66,11 @@ class Misc: # self.tk.call('selection', 'own', self._w) def send(self, interp, cmd, *args): #XXX return apply(self.tk.call, ('send', interp, cmd) + args) + def lower(self, belowThis=None): + self.tk.call('lift', self._w, belowThis) + def tkraise(self, aboveThis=None): + self.tk.call('raise', self._w, aboveThis) + lift = tkraise def colormodel(self, value=None): return self.tk.call('tk', 'colormodel', self._w, value) def winfo_atom(self, name): @@ -581,6 +590,7 @@ class Canvas(Widget): return self._do('postscript', self._options(cnf)) def tkraise(self, *args): self._do('raise', args) + lift = tkraise def scale(self, *args): self._do('scale', args) def scan_mark(self, x, y): diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index e9e641c..951a1d6 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -26,6 +26,10 @@ class Misc: self.tk.call('tkwait', 'variable', name) def setvar(self, name='VAR', value='1'): self.tk.setvar(name, value) + def getvar(self, name='VAR'): + return self.tk.getvar(name) + def getint(self, s): + return self.tk.getint(s) def focus(self): self.tk.call('focus', self._w) def focus_default(self): @@ -62,6 +66,11 @@ class Misc: # self.tk.call('selection', 'own', self._w) def send(self, interp, cmd, *args): #XXX return apply(self.tk.call, ('send', interp, cmd) + args) + def lower(self, belowThis=None): + self.tk.call('lift', self._w, belowThis) + def tkraise(self, aboveThis=None): + self.tk.call('raise', self._w, aboveThis) + lift = tkraise def colormodel(self, value=None): return self.tk.call('tk', 'colormodel', self._w, value) def winfo_atom(self, name): @@ -581,6 +590,7 @@ class Canvas(Widget): return self._do('postscript', self._options(cnf)) def tkraise(self, *args): self._do('raise', args) + lift = tkraise def scale(self, *args): self._do('scale', args) def scan_mark(self, x, y): -- cgit v0.12