tkinter butoon program code example
Example 1: button tkinter
import Tkinter
import tkMessageBox
top = Tkinter.Tk()
def helloCallBack():
tkMessageBox.showinfo( "Hello Python", "Hello World")
B = Tkinter.Button(top, text ="Hello", command = helloCallBack)
B.pack()
top.mainloop()
Example 2: add a button on tkinter
import tkinter
button1 = ttk.Button(self, text="anything", command=random command)
button1.pack()