23-05-2019, 03:52 PM
Hola!
No entiendo como poner flechas de scroll en el eje Y de lo siguiente:
Alguna idea?
Estoy mirando acá:
https://www.tutorialspoint.com/python/tk_listbox.htm
Y no veo nada de "scroll"
Vi este ejemplo...
Pero me cuesta....
No entiendo como poner flechas de scroll en el eje Y de lo siguiente:
Código:
import tkinter as tk
# listado principal
lista1 = tk.Listbox()
lista1.place(x=5,y=120,width=790,height=375)
Alguna idea?
Estoy mirando acá:
https://www.tutorialspoint.com/python/tk_listbox.htm
Y no veo nada de "scroll"
Vi este ejemplo...
Código:
import tkinter as tk
#Make Window
root = tk.Tk()
root.geometry("612x417")
root.title("Exchange Rates")
root.resizable(0,0)
root.configure(background='lightgrey')
#End
#Try to create a listbox with a scroll bar within a frame
#Create elements
frame = tk.Frame(root, bd=1, relief='sunken', width=150, height=300)
scrollbar = tk.Scrollbar(frame)
listbox = tk.Listbox(frame)
#Attach listbox to scrollbar
listbox.config(yscrollcommand=scrollbar.set)
scrollbar.config(command=listbox.yview)
#Poulate listbox
for i in range(100):
listbox.insert('end', i)
#Pack elements
frame.pack(side='top')
scrollbar.pack(side='right', fill='y')
listbox.pack()
root.mainloop()
Pero me cuesta....