sovrascrivere

F

fabri16

ciao..


ho creato i tasti con le immagini


def creaImmagine(self):
img = tk.PhotoImage(file=self.ico1)
b = tk.Button(root, image=img, command=self.allaPressione)
b.pack(side='left',padx=25)
b.configure (width=80, height=80)
b.image = img


mi resta solo un problema.. questo metodo viene richamato più volte,
ma i tasti non vengono sovrasritti bensì aggiunti (a sinistra).

come faccio per sovrascriverli?
ho provato con destroy, ma finisce che non mi crea neppure l'immagine.

oppure senza sovrascriverli mi basterebbe cambiare l'immagine
all'interno (ma credo che il modo migliore sia sovrascriverli).

ah...prima che mi scordi.. windows e tkinter.

grazie

fabri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,899
Messages
2,569,992
Members
46,340
Latest member
Marcia11B5

Latest Threads

Top