Avec le code ci-dessous, je souhaite que label s'affiche en étant "espacé" de canvas
j'en perds mon latin
merci d'avance de votre aide

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
from tkinter import *
 
root = Tk()
root.title("Example")
root.geometry("400x400")
root.config(background='red')
frame = Frame(root, height=250, width=250, bg="green")
frame.grid_propagate(0)
frame.grid()
 
canvas = Canvas(frame, height=240, width=100, bg="grey")
canvas.grid(row=0, column=0, rowspan=4)
 
label = Label(frame, text="xxx", fg="blue", bg="yellow", width=5, height=2)
label.grid(row=0, column=1, columnspan=2, sticky=E)
 
root.mainloop()