Salut, je bosse actuellement sur l'interface de mon projet d'isn, j'utilise Tkinter. J'ai séparé mon écran en plusieurs frames pour pouvoir placer les canvas comme je le souhaitais. Cependant, je n'arrive pas à rendre le fond des frames transparents, donc j'ai mon image (.gif à fond transparent) où je ne vois pas le fond que j'ai mis en jaune pour bien le remarquer si jamais. Donc mon image, mon canvas ou mon frame fait bugger la transparence.

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
from Tkinter import *
 
# Creation de la fenetre windows
Jeu=Tk()
Jeu.title("Break The Team")
Jeu.geometry("1200x720")
Jeu.resizable(width=False,height=False)
Jeu.configure()
 
'''fond = PhotoImage(file="fond_plateau1.gif")
Canevas = Canvas(Jeu, width=1200, height=720)
item = Canevas.create_image(0,0,anchor=NW, image=fond)
print(item)'''
 
# Creation des frames principales
frame3 = Frame(Jeu, bg="yellow", width=200, height=720)
frame3.pack(side=LEFT)
 
frame1 = Frame(Jeu, bg="black",    width=1000, height=620)
frame1.pack(side=BOTTOM)
 
frame2 = Frame(Jeu, bg="blue",   width=1000, height=100)
frame2.pack()
 
# Creation des frames secondaires
    # Frames de gauches
framea = Frame(frame3, bg="yellow",width=200, height=70)
framea.pack (side=TOP)
photo1 = PhotoImage(file="test1.gif")
Canfra = Canvas(framea, width=200, height=70)
item1 = Canfra.create_image(0,0,anchor=NW, image=photo1)
print(item1)
Canfra.pack()
 
frameb = Frame(frame3, bg="green",width=200, height=90)
frameb.pack (side=TOP)
 
framec = Frame(frame3, bg="red",width=200, height=90)
framec.pack (side=TOP)
 
framed = Frame(frame3, bg="green",width=200, height=340)
framed.pack (side=TOP)
 
framee = Frame(frame3, bg="white",width=200, height=130)
framee.pack ()
 
Jeu.mainloop()
Merci d'avance pour vos réponses