mirror of
https://github.com/Xevion/tkinter-mini-projects.git
synced 2025-12-06 01:16:37 -06:00
init
This commit is contained in:
21
listbox.py
Normal file
21
listbox.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from tkinter import *
|
||||
|
||||
|
||||
|
||||
root = Tk()
|
||||
frame = Frame(root)
|
||||
listbox = Listbox(frame)
|
||||
|
||||
def callback(event):
|
||||
print('Callback', event)
|
||||
listbox.delete(ACTIVE)
|
||||
|
||||
frame.bind("<Double-Button-1>", callback)
|
||||
frame.pack()
|
||||
listbox.pack()
|
||||
|
||||
for i in range(20):
|
||||
listbox.insert(END, str(i))
|
||||
|
||||
|
||||
root.mainloop()
|
||||
Reference in New Issue
Block a user