mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Added Menu.insert*() methods [Fred]
This commit is contained in:
parent
e1a7a3b3b3
commit
2caac73aa6
2 changed files with 26 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue