Button Invoke() Example 1

Tkinter button widget can be used to perform a specific Task. invoke() method can be called up after the initialization of the Button widget. It is called automatically once the Button widget is Prepared. There is no effect  if the button is disabled or Enabled.


******Your code Below*****

from tkinter import *
from tkinter import messagebox

root =Tk()
root.title("Button Invoke")
root.geometry("800x350+450+86")

def show_info():
messagebox.showinfo(title='Show Info', message='You are Invoking Me')

btn1= Button(root, text='Button Invoke', font=('times', 20, 'bold'), command=show_info)
btn1.pack(pady=50)
btn1.invoke()

root.mainloop()

********End Code**********


Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.



Enjoy..............


If You Want To Learn More Plz Visit www.newpost24.com

If You Find Specific link plz Follow This Page.

Post a Comment

Previous Post Next Post