“Cómo cambiar el texto en un tinter de lona” Código de respuesta

Texto tkinter en lienzo

self.canvas = Canvas(root, width=800, height=650, bg = '#afeeee')
self.canvas.create_text(100,10,fill="darkblue",font="Times 20 italic bold",
                        text="Click the bubbles that are multiples of two.")
MrStonkus

Cómo cambiar el texto en un tinter de lona

#here im giving you an example of how you can change canvas text, u have to use itemconfig 

self.canvas = Canvas(root, width=800, height=650, bg = '#afeeee')
mytext = self.canvas.create_text(100,10,fill="darkblue",font="Times 20 italic bold",text="Click the bubbles that are multiples of two.")
#here ill edit the text

time.sleep(1)

self.canvas.itemconfig(mytext, text="text has changed!")

#this is an edit because for accident i typed some text wrong, this is fix
Average Anteater

Cómo cambiar el texto en un tinter de lona

#here im giving you an example of how you can change canvas text, u have to use itemconfig :)

self.canvas = Canvas(root, width=800, height=650, bg = '#afeeee')
mytext = self.canvas.create_text(100,10,fill="darkblue",font="Times 20 italic bold",text="Click the bubbles that are multiples of two.")
#here ill edit the text.

time.sleep(1)

self.canvas.itemcongig(mytext, text="text has changed!")
Average Anteater

Respuestas similares a “Cómo cambiar el texto en un tinter de lona”

Preguntas similares a “Cómo cambiar el texto en un tinter de lona”

Más respuestas relacionadas con “Cómo cambiar el texto en un tinter de lona” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código