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
|
principale=Tk()
principale.title('Cockpit')
principale.option_readfile('apparence', priority=None)
f3=LabelFrame(principale, name='f3', width=50, height = 50, padx=1, pady=1, text='f3', relief = 'flat', labelanchor='nw')
f3.grid(column=0, row=2,columnspan=2, rowspan = 11, sticky='n')
#---------FRAME3-------------
#Texte choix objet (chat...)
labMENU = Label(f3, text='Choix de l\'objet à suivre :')
labMENU.grid(column=0,row = 0, columnspan = 2)
#Bouton choix classe d'objet
typeOBJ.set(CLASSES[8])
MenuOBJ = OptionMenu(f3, typeOBJ, *CLASSES)
MenuOBJ.grid(column=0,row = 1, columnspan = 2)
#Texte choix source (USB ou incoporée)
labCHCAM = Label(f3, text='Choix de la source de la vidéo :')
labCHCAM.grid(column=0,row = 2, columnspan = 2)
#Boutons choix source (USB ou incoporée)
vals = [0, 1, 2]
etiqs = ['Interne', 'USB', 'IP']
varCAM.set(vals[0])
for i in range(3):
BoutonCAM = Radiobutton(f3, variable=varCAM, text=etiqs[i], value=vals[i])
BoutonCAM.grid(column=i,row=3)
#Insertion GIF anim f3
can2 = Canvas(f3, name='can3', width=260, height=260)
can2.grid(column=0,row=5, columnspan=3, rowspan = 4)
ind2 = -1
def update2(delay=100):
global ind2
global photo2
ind2 += 1
if ind2 == 51: ind2 = 0
photo2.configure(format="gif -index " + str(ind2))
f3.after(delay, update2) |
Partager