diff options
author | Guido van Rossum <guido@python.org> | 1996-09-05 16:46:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-09-05 16:46:31 (GMT) |
commit | 2caac73aa69120580bc4dc1d5817b9c2c3d05abf (patch) | |
tree | 3424af79c56fb7da0801d681fd3cd9ed4a887d33 /Lib/tkinter | |
parent | e1a7a3b3b349ffd24cf25593a446e9f9bec9d615 (diff) | |
download | cpython-2caac73aa69120580bc4dc1d5817b9c2c3d05abf.zip cpython-2caac73aa69120580bc4dc1d5817b9c2c3d05abf.tar.gz cpython-2caac73aa69120580bc4dc1d5817b9c2c3d05abf.tar.bz2 |
Added Menu.insert*() methods [Fred]
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-x | Lib/tkinter/Tkinter.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index f43e3d6..1f784fd 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -1255,6 +1255,19 @@ class Menu(Widget): self.add('radiobutton', cnf or kw) def add_separator(self, cnf={}, **kw): self.add('separator', cnf or kw) + def insert(self, index, itemType, cnf={}, **kw): + apply(self.tk.call, (self._w, 'insert', index, itemType) + + self._options(cnf, kw)) + def insert_cascade(self, index, cnf={}, **kw): + self.insert(index, 'cascade', cnf or kw) + def insert_checkbutton(self, index, cnf={}, **kw): + self.insert(index, 'checkbutton', cnf or kw) + def insert_command(self, index, cnf={}, **kw): + self.insert(index, 'command', cnf or kw) + def insert_radiobutton(self, index, cnf={}, **kw): + self.insert(index, 'radiobutton', cnf or kw) + def insert_separator(self, index, cnf={}, **kw): + self.insert(index, 'separator', cnf or kw) def delete(self, index1, index2=None): self.tk.call(self._w, 'delete', index1, index2) def entryconfig(self, index, cnf=None, **kw): |