python_by_example/tkgui/example01.py
2023-11-17 13:26:09 -03:00

14 lines
332 B
Python

import tkinter as tk
def Call():
msg = tk.Label(window, text="Presionaste el botón")
msg.place(x=30, y=50)
button["bg"] = "blue"
button["fg"] = "white"
window = tk.Tk()
window.geometry("200x100")
button = tk.Button(text="Presioname", command=Call)
button.place(x=30, y=20, width=120, height=25)
window.mainloop()