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