Python GUI

ehigie-ehizogie report abuse

Please can someone show me the problem why the this code isn't running. import tkinter as tk from tkinter import ttk win = tk.Tk() win.title("My GUI Mastering") ttk.Label(win, text='A Label').grid(column=0, row=0) alabel - ttk.Label(win, text-'A Label') alabel.grid(column=0, row=0)

Button Click Event Function

def clickme(): action.configure(text='^ I have been clicked**') alabel.configure(foreground='blue') a_label.configure(text='A Blue Label')

adding a button

action = ttk.Button(win, text='Click me!', command=click_me) action.grid(column=1, row=0) win.mainloop()

Add Answer

Need support?

Just drop us an email to ... Show more