Python GUI | ( Lable, Geometry, Maxsize and Minsize )

 Python GUI | ( Lable, Geometry, Maxsize and Minsize ) 

    Tkinter tutorial provides basic and advanced concepts of Python Tkinter. Our Tkinter tutorial is designed for beginners and professionals.

    Python provides the standard library Tkinter for creating the graphical user interface for desktop based applications.

    Developing desktop based applications with python Tkinter is not a complex task. An empty Tkinter top-level window can be created by using the following steps.

  1. import the Tkinter module.
  2. Create the main application window.
  3. Add the widgets like labels, buttons, frames, etc. to the window.
  4. Call the main event loop so that the actions can take place on the user's computer screen.
Example.
from tkinter import *
a_root = Tk()
#GUI logic here
a_root.mainloop()

Output


from tkinter import *
a_root = Tk()

# set width x height
a_root.geometry("644x434")

#set minimum size( width x height )
a_root.minsize(200,100)

#set maximum size ( width x height )
a_root.maxsize(1000,800)

pappu = Label(text="shreyash is a good boy and this is GUI")
pappu.pack()

#GUI logic here
a_root.mainloop()

Output