Tkinter GUI
Tkinter GUI
def Call():
button["bg"] = "blue"
button["fg"] = "red"
label = Label(window, text = "Your here the Button")
label.place(x=40, y=50)
window = Tk()
window.title("This is the first my App")
window.geometry("250x200")
button = Button(text ="Click here", command = Call)
button.place(x=40, y = 30, width =100, height = 25)
window.mainloop()
Example Code
from tkinter import *
This line must go at the beginning of the
program to import the Tkinter librar.
window = Tk()
window.title(“Window Title”)
window.geometry(“450x100”)
Creates a window that will act as the display,
referred to as “window”, adds a title and defines
the size of the window.
Example Code
label = Label(text = “Enter number:”)