Professional Documents
Culture Documents
* for example,
If we want one button, then we have to declare
one object of class Button.
If we want one textbox, then we have to declare
one object of class Entry.
===========================
For example:
-------------
base = Tk()
b1 = Button(base)
b1.pack()
base.mainloop()
=============================
Example 2:
-----------
base = Tk()
base.geometry("300x300")
base.title("Demonstrating First GUI")
btn1 = Button(base, text="Submit", fg="blue", bg="yellow")
btn1.pack()
txt1 = Entry(base)
txt1.pack()
base.mainloop()
=========================================
Example-3:
-----------
base = Tk()
base.geometry("300x300")
base.title("Demonstrating First GUI")
base.mainloop()
=========================================
pack():
This method directly adds component object into center
of screen. Mainly prefer this to directly add panels.
place():
This method has 2 parameters.
x =
y =
We specify co-ordinate of X axis and Y axis.
For example:
-------------
base.mainloop()
==================================================