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
|
#1ER APPLI
def WEBMATIQUE_72(event=None):
.....
#2EME APPLI
def GK(event=None):
.....
#3
....
#CREATION DES BOUTONS A PARTIR DE LA
LISTE_COULEURS = [......]
num_appli = 0
num_couleur = 0
parser = ConfigParser()
parser.read('C:\APPLILOC\APPLI+\APPLI+_PARAM.ini')
sec = parser.sections()[0]
for name, value in parser.items(sec):
if value=='OUI' or value=='oui':
LISTE_BOUTONS.append(name)
print(LISTE_BOUTONS)
for i in LISTE_BOUTONS:
if num_appli <= 15:
NOM_APP = LISTE_BOUTONS[num_appli].upper()
print(NOM_APP)
bouton = Button(Frame_BOUTONS_1, text=(LISTE_BOUTONS[num_appli].upper()).replace("_", "\n"), background=LISTE_COULEURS[num_couleur],command=lambda temp_APP=NOM_APP: ???? , font=font.Font(size=8, weight="bold"), height=2)
bouton.pack(side='left')
ws.update_idletasks()
if bouton.winfo_width()<50:
bouton.config(width=5)
else:
bouton = Button(Frame_BOUTONS_2, text=(LISTE_BOUTONS[num_appli].upper()).replace(" ", "\n"), background=LISTE_COULEURS[num_couleur], command="", font=font.Font(size=8, weight="bold"), height=2)
bouton.pack(side='left')
ws.update_idletasks()
if bouton.winfo_width() < 50:
bouton.config(width=5)
num_appli=num_appli+1
if num_couleur == 27:
num_couleur = 0
else:
num_couleur = num_couleur + 1 |
Partager