1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
racine=Tk()
#Frame
cadre0=Frame(racine)
retour=IntVar()
Label(cadre0, text="titre ********",fg='blue').grid(row=1, column=2)
b1=Radiobutton(cadre0, text="- xxxxxxxxxxxxxxxxx--", variable=retour,indicatoron=0,borderwidth=1,padx =45, pady =8,value=1).grid(row=8, column=2)
b2=Radiobutton(cadre0, text="- xxxxxxxxxxxxxxxxxxx", variable=retour,indicatoron=0,borderwidth=1,padx =45, pady =8,value=2).grid(row=10, column=2)
b3=Radiobutton(cadre0, text="- xxxxxxxx-----------", variable=retour,indicatoron=0,borderwidth=1,padx =36, pady =8,value=3).grid(row=12, column=2)
b4=Radiobutton(cadre0, text="- xxxxxxxxxxxxx------", variable=retour,indicatoron=0,borderwidth=1,padx =41, pady =8,value=4).grid(row=14, column=2)
cadre0.pack(side=LEFT)
# création d'un widget 'Canvas' contenant une image bitmap :
can1 = Canvas(racine, width =160, height =160)
photo = PhotoImage(file ='image.gif')
item = can1.create_image(80,80, image =photo)
can1.pack(side=RIGHT)
boutonq=Button(racine, text="Quitter", command=racine.destroy).pack(side=BOTTOM,padx =4, pady =18)
bouton=Button(racine, text="Valider", command=afficher).pack(side=BOTTOM,padx =4, pady =38) |
Partager