Bonjour, je parcours internet à la recherche d'une solution pour faire cohabiter un rond et un bouton placé par la méthode grid(). Or depuis que j'ai enlever rond.pack() mon rond jaune a disparu. Comment résoudre cela ? Merci
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
16
17
18
19
20
21
22
23
24
25 #!/usr/bin/env python # -*- coding: utf-8 -*- from tkinter import * #print(dir(tkinter)) # help(tkinter.Canvas) tk=Tk() tk.title('Jeu du Baccalauréat') rond=Canvas(tk, width=500, height=500) rond.create_oval(100,100,400,400,fill='yellow',outline='red', width= '5') rond.create_text(250,250, text="Jouons au Baccalauréat", font=('Times', 20)) b=Button(tk, text=' clique ici', height='5') b.grid (row=1 , column = 1) tk.mainloop()
Partager