Remove listbox try out script.
This commit is contained in:
parent
a3e49a75f0
commit
d280649be3
21
trylb.py
21
trylb.py
|
|
@ -1,21 +0,0 @@
|
|||
from Tkinter import Tk, mainloop, BOTH
|
||||
from joy.gui.controllerlistbox import ControllerListbox
|
||||
|
||||
|
||||
class StackListbox(ControllerListbox):
|
||||
|
||||
def _update(self):
|
||||
self.delete(0, 'end')
|
||||
self.insert(0, *self.stack)
|
||||
|
||||
def dnd_commit(self, source, event):
|
||||
ControllerListbox.dnd_commit(self, source, event)
|
||||
self._update()
|
||||
|
||||
|
||||
T = Tk()
|
||||
T.title("Hello there.")
|
||||
stack = [1, 2, 3]
|
||||
lb = FooListbox(T, items=stack)
|
||||
lb.pack(expand=True, fill=BOTH)
|
||||
lb._update()
|
||||
Loading…
Reference in New Issue