Scroll bar qui ne marche pas
Résolu
Pr.Witherfire
-
Pr.Witherfire -
Pr.Witherfire -
Bonjour j'ai un code avec un Scroll qui ne marche pas.
from tkinter import * F = Tk() Sb = Scrollbar(F, orient='vertical') Sb.pack(side=RIGHT, fill='y') C = Canvas(F, bg="red", width=1525, height=6000, yscrollcommand=Sb.set, bd=0) Frame = Frame(C, bg="blue", width=1525, height=6000) for i in range(20): globals()["B"+str(i)]=Button(F, text="Bonjour") globals()["B" + str(i)].place(x=100, y=100*i) F.mainloop()
Pouvez vous m'aider merci bonne soirée
A voir également:
- Tkinter scrollbar frame
- Battery bar - Télécharger - Informations & Diagnostic
- Scroll lock ✓ - Forum Matériel & Système
- Scroll lock - Forum Windows
- Touche scroll lock ✓ - Forum Excel
- Touche "scroll lock" - Forum Windows
3 réponses
Bonjour,
https://pythonguides.com/python-tkinter-scrollbar/
Il y a un paragraphe scrollbar canvas ...
Bonjour,
Il manque des trucs pour que ça fonctionne : regarde les exemples sur internet
pas terrible ce truc-là:
Frame = Frame(C, bg="blue", width=1525, height=6000)
Le nom du Frame est le mot réservé Python Frame
Pas terrible non plus, ce truc de globals() , et d'ailleurs, quel intérêt ? :
globals()["B"+str(i)]=Button(F, text="Bonjour")
Ok merci beaucoup au revoir