how to add button in tkinter
from tkinter import *
window = Tk()
def got_clicked():
print("I got clicked!")
my_button = Button(text="Click me", command=got_clicked)
my_button.pack()
window.mainloop()
how to add button in tkinter
from tkinter import *
window = Tk()
def got_clicked():
print("I got clicked!")
my_button = Button(text="Click me", command=got_clicked)
my_button.pack()
window.mainloop()
Function to a button in tkinter
from tkinter import *
#Creating a win
win = Tk()
#Giving a Function To The Button
def btn1():
print("I Don't Know Your Name")
#Creating The Button
button1 = Button(win, text="Click Me To Print SomeThing", command=btn1)
#put on screen
button1.pack()
win.mainloop()
#NB:This programme Will Print Something In The Terminal
#Check My Profile To See How We Print On The Screen Or Type In Google "Tkinter Label"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us