“Cómo agregar múltiples comandos al botón Tkinter” Código de respuesta

Tkinter Give Button 2 Comandos

button = Button(root, text="test", command=lambda:[funct1(),funct2()])
Basss

Cómo agregar múltiples comandos al botón Tkinter

all_commands = lamba: [func1(), func2()]

button = Button(window, text="This is a button", command=all_commands)
Witty Wallaby

Cómo agregar múltiples comandos al botón Tkinter

#Define a command
yummy=0
def all_commands:
  print("burgers")
  yummy+=1
button = Button(window, text="Hello", command=all_commands)
Hurt Hare

Respuestas similares a “Cómo agregar múltiples comandos al botón Tkinter”

Preguntas similares a “Cómo agregar múltiples comandos al botón Tkinter”

Más respuestas relacionadas con “Cómo agregar múltiples comandos al botón Tkinter” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código