-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.py
36 lines (27 loc) · 1.16 KB
/
Menu.py
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
from tkinter import *
class MenuBar(Menu):
def __init__(self, root, **arg):
#Barre de menu
self.menuBar=Menu(root)
#Menu Simulation
self.menuSimul=Menu(self.menuBar, tearoff=0)
#bouton pour ajouter une fourmi
self.menuSimul.add_command(label="Ajouter une fourmi", \
activebackground='green',\
activeforeground='black', \
command=None)
#bouton pour supprimer une fourmi
self.menuSimul.add_command(label="Supprimer une fourmi", \
activebackground='red',\
activeforeground='black', \
command=None)
#bouton pour remettre tout blanc
self.menuSimul.add_command(label="Tout blanc", \
activebackground='white',\
activeforeground='light grey', \
command=None)
self.menuBar.pack()
if __name__=='__main__':
app=Tk()
menu=MenuBar(app)
app.mainloop()