Browse Source

ampoule fonctionel

master
RAVET Célya 1 month ago
parent
commit
1445112bac
  1. 13
      projet_tkinter.py

13
projet_tkinter.py

@ -1,14 +1,13 @@
import tkinter as tk import tkinter as tk
def allumer (): def allumer ():
rond = canva.create_oval(310,130,200,300,fill='yellow') canva.itemconfigure(rond, fill='yellow')
rectangle=rectangle =canva.create_rectangle canva.itemconfigure(rectangle,fill='black')
(230,300,280,380, fill='black')
canva=tk.Canvas(fenetre, width=500, height=500, bg='white')
def eteindre ():
rond = canva.create_oval(310,130,200,300,fill='black',
outline='white')
def eteindre ():
canva.itemconfigure(rond,fill='black',outline='white')
canva.itemconfigure(rectangle,fill='white')
fenetre = tk.Tk() fenetre = tk.Tk()
fenetre.title('lampe') fenetre.title('lampe')
canva=tk.Canvas(fenetre, width=500, height=500, bg='black') canva=tk.Canvas(fenetre, width=500, height=500, bg='black')

Loading…
Cancel
Save