Tkinter

Total Post:113

Points:791
Gui  Python 
 106  View(s)
Ratings:
Rate this:

what is tkinter in python?

  1. Post:140

    Points:984
    Re: Tkinter

    - Tkinter is a lib for designing GUI in python.

    - Import the Tkinter module. Create the GUI application in main window. 

    - Add one or more of the above-mentioned widgets to the GUI application.

    Syntax :

    import tkinter 
    top = tkinter.Tk()
    top.mainloop()

    Example for adding any text with a button :

    from tkinter import* 
    from tkinter ttk
    root = Tk()
    label (root,text="Hello!").pack()
    button= ttk.Button(root,text="click me")
    button.pack()
    def callback():
     print("clicked!")
    root.main loop()


      Modified On Jun-27-2018 03:44:17 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!