补充button的forget和select的change
Build and Publish / Run (push) Successful in 59s
Details
Build and Publish / Run (push) Successful in 59s
Details
This commit is contained in:
parent
fc55478b12
commit
a4de1f152c
|
@ -166,6 +166,15 @@ class Button:
|
|||
def place(self, *args, **kwargs):
|
||||
self.canvas.place(*args, **kwargs)
|
||||
|
||||
def pack_forget(self, *args, **kwargs):
|
||||
self.canvas.pack_forget(*args, **kwargs)
|
||||
|
||||
def grid_forget(self, *args, **kwargs):
|
||||
self.canvas.grid_forget(*args, **kwargs)
|
||||
|
||||
def place_forget(self, *args, **kwargs):
|
||||
self.canvas.place_forget(*args, **kwargs)
|
||||
|
||||
def _draw(self, _use_self_text=None):
|
||||
self._draw_corner(0, 0, 0, 0)
|
||||
self._draw_corner(1, 0, self.w-4, 0)
|
||||
|
|
|
@ -68,6 +68,13 @@ class Select(button.Button):
|
|||
for event, eventfunc in master.p_event_list:
|
||||
self.canvas.bind(event, eventfunc)
|
||||
|
||||
def change_menu(self, items):
|
||||
self.items = items
|
||||
self.__menuobj = submenu.MenuObjs()
|
||||
self.__last = 0
|
||||
for i in self.items:
|
||||
self.__menuobj.addmenu(i, self._callback_menu)
|
||||
|
||||
def _draw(self):
|
||||
super()._draw(True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue