Bonjour, je fais appel a vous car je comprend pas comment on fait pour intégrer une scrollbar dans une frame ou un top level.

Voici mon code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from tkinter import *
 
fenetre = Tk()
 
scrollbar = Scrollbar(fenetre)
scrollbar.pack(side=RIGHT, fill=Y)
 
myframe=Frame(fenetre)
 
for i in range(0,200):
	champ_label = Label(myframe, text="test !")
	champ_label.pack()
 
myframe.pack()
fenetre.mainloop()
Je veut une scrollbar sur l'axe y pour afficher mes 200 éléments.

Merci d'avance pour votre aide.

EDIT: j'utilise python 3.4 sous windows7 Pro 64bits