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 49 50 51 52 53
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# *
from tkinter import *
class Gammique(Tk):
""" Ramification Gammique """
def __init__(self):
Tk.__init__(self)
"Tableau de bord"
self.title('Entité Gammique :')
# Fenêtre écran_résultat
self.can=Canvas(self,bg='white', height=500,width=800)
self.can.pack(side=RIGHT)
# Bouton quitter
Button(self, text='Quitter',bg='light grey',width=15,
command=self.destroy).pack(side=BOTTOM)
# Mémoire d'octave fantôme # Utilisée pour mémoriser
self.ent= Entry(self) # l'octave antérieure.
self.ent.pack() #
#self.ent.pack_forget()# Pantomime #
self.ent.delete(0,END) #
self.ent.insert(END,"IOI") #
# Groupe Octave RADIO
self.rad=[
Radiobutton(
self,
variable=variable,
text=text,
value=value,
command=command,
)for (variable, text, value,command) in (
("yioiy","Octave +1", "ioy",self.yoiioiioy),
("yioiy","Octave 0", "ioi",self.yoiioiioy),
("yioiy","Octave -1", "yoi",self.yoiioiioy),
)
]
for i in self.rad: i.pack()
self.rad[1].invoke()
# __init__()
# Les octaves du groupe RADIO
def yoiioiioy(self):
xradfan="0"
self.ent.delete(0,END)
self.ent.insert(END,xradfan)
print ('*')
# class Gammique
Gammique().mainloop() |
Partager