how to put a button in python?

0 votes
asked Jan 2, 2019 by Filo4 (200 points)
How do you put a button in python?

1 Answer

0 votes
answered Jan 3, 2019 by NikhatShah (180 points)
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()
commented Jan 4, 2019 by Filo4 (200 points)
thank you for the answer
commented Jan 4, 2019 by Filo4 (200 points)
it doesn't work
commented Jan 22, 2019 by นายเบ็นซ์รีวิว (250 points)
install python
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...