1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
from tkinter import *
def maliste():
for i in range(100):
label = Label(frame, text = f"Ligne n°{i} " , font=("Courrier", 10), bg = "#41B77F", fg = "white")
label.pack()
window = Tk()
window.title("Test scroll")
window.geometry("800x500")
window.config(background='#41B77F')
SVBar = Scrollbar(window)
SVBar.pack (side = RIGHT, fill = "y")
frame = Frame(window, bg = '#41B77F')
frame.pack()
cr_bouton = Button(frame, text = "Test", font = ("Courrier", 25), bg = "white", fg = "#41B77F", command = maliste)
cr_bouton.pack(pady = 25, fill = X)
window.mainloop() |
Partager