Calificación:
  • 1 voto(s) - 5 Media
  • 1
  • 2
  • 3
  • 4
  • 5
TKinter listbox flechas de scroll
#1
Hola!

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....
Responder
#2
Ahi va quedando....

https://github.com/TenoTrash/Inventario
Responder
#3
Muy bueno el código.

Sobre la barra de deslizamiento en listas hay información acá: https://recursospython.com/guias-y-manua...n-tkinter/.

Saludos
¡No te pierdas nuestro curso oficial en Udemy para aprender Python, bases de datos SQL, orientación a objetos, tkinter y mucho más!

También ofrecemos consultoría profesional de desarrollo en Python para personas y empresas.
Responder
#4
(25-05-2019, 02:22 PM)Francisco escribió: Muy bueno el código.

Sobre la barra de deslizamiento en listas hay información acá: https://recursospython.com/guias-y-manua...n-tkinter/.

Saludos

Ahi pude, queda mucho mejor, mas intuitivo
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)