Bonjour à tous

Je me pose une question essentielle portant sur l'utilisation du curseur.
Je sais, que les propriétés permettent le mouvement du curseur automatisé.

Mon problème est que j'aimerais bien gérer le ou les curseurs ailleurs que dans la classe principale "Gammique(Tk):"
La classe principale "Gammique(Tk):" : C'est le tableau de bord

Je voudrais aussi avoir la possibilité de ne pas inclure "command=fonction", au curseur à cause de l'automatisme.

En créant une classe héritière "ProGamme(Gammique):"
La classe héritière "ProGamme(Gammique):" La partie du programme qui gère les utilisations

Comment détecter l'utilisation du curseur, changer le curseur de place.




Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
54
55
56
57
58
59
60
61
62
63
64
65
66
# 
# Application gammique évolutive
# Version 1 : Calculer les gammes
#
from tkinter import *
 
# Dessine une note
def cercle(can,x,y,r):
    can.create_oval(x-r,y-r,x+r,y+r)
 
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='ivory', height=500,width=750)
        self.can.pack(side=RIGHT)
        # Bouton gamme_audio
        Button(self,text ='Radio').pack()
        # Les notes cursives scalpha : Graduations gérées.
        self.sca1=Scale(self,length =250,orient = HORIZONTAL,label ='C',
              troughcolor ='black',sliderlength =20,showvalue =0,
              from_ =0,to =5,tickinterval =1).pack()
        self.sca2=Scale(self,length =250,orient = HORIZONTAL,label ='D',
              troughcolor ='green',sliderlength =20,showvalue =0,
              from_ =-1,to =4,tickinterval =1).pack()
        self.sca3=Scale(self,length =250,orient = HORIZONTAL,label ='E',
              troughcolor ='blue',sliderlength =20,showvalue =0,
              from_ =-2,to =3,tickinterval =1).pack()
        self.sca4=Scale(self,length =250,orient = HORIZONTAL,label ='F',
              troughcolor ='grey',sliderlength =20,showvalue =0,
              from_ =-2,to =3,tickinterval =1).pack()
        self.sca5=Scale(self,length =250,orient = HORIZONTAL,label ='G',
              troughcolor ='red',sliderlength =20,showvalue =0,
              from_ =-3,to =2,tickinterval =1).pack()
        self.sca6=Scale(self,length =250,orient = HORIZONTAL,label ='A',
              troughcolor ='orange',sliderlength =20,showvalue =0,
              from_ =-4,to =1,tickinterval =1).pack()
        self.sca7=Scale(self,length =250,orient = HORIZONTAL,label ='B',
              troughcolor ='yellow',sliderlength =20,showvalue =0,
              from_ =-5,to =0,tickinterval =1).pack()
        # Concerne les notes scahuit : Graduations gérées.
        self.sca8=Scale(self,length =250,orient = HORIZONTAL,label ='CDEFGAB',
              troughcolor ='white',sliderlength =20,showvalue =0,
              from_ =-12,to =12,tickinterval =1).pack()
        # Bouton gamme_naturelle
        Button(self,text ='Zéro').pack()
        # Texte significatif
        self.lab=Label(self,text="Barre des tâches ").pack(side=RIGHT)
        # Tableau réunissant les tables diatoniques
        self.gammes =['1101110','0201110','2001110','4000010','1011110','0111110','1030010',
          '1210010','2200010','0012110','1300010','0021110','1220000','0040010',
          '1400000','1002110','0102110','1130000','0003110','1100210','0200210',
          '0202010','2000210','1010210','1012010','1112000','2003000','0020210',
          '1202000','1003010','1001210','1103000','1121000','0100310','0010310',
          '0001310','0002210','1000310','0022010','0000410','0023000','1004000',
          '0005000','1101020','1101200','0201020','0201200','2001020','2001200',
          '1011020','1011200','1100120','1100300','1102100','1120100','0200030',
          '1002200','1001030','1300100','1000130','0003020','0021200','1000040',
          '0003200','1100030','3000020']
 
 
prgm = Gammique()
prgm.mainloop()