File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ # import tkinter module
2
+ from tkinter import *
3
+ import tkinter as tk
4
+
5
+ # creating main tkinter window/toplevel
6
+ root = tk .Tk ()
7
+
8
+ root .geometry ("230x120" )
9
+ root .title ('Form' )
10
+
11
+ # Lable() function creates a label widget
12
+
13
+ l1 = Label (root , text = "Email:" )
14
+ l2 = Label (root , text = "Password:" )
15
+
16
+ # grid method to arrange labels in respective
17
+ # rows and columns as specified
18
+
19
+ l1 .grid (row = 1 , column = 1 , pady = 10 ,padx = 15 )
20
+ l2 .grid (row = 2 , column = 1 , pady = 4 ,padx = 15 )
21
+
22
+ # entry widgets, used to take entry from user
23
+ e1 = Entry (root )
24
+ e2 = Entry (root )
25
+
26
+ # this will arrange entry widgets
27
+ e1 .grid (row = 1 , column = 2 , pady = 10 )
28
+ e2 .grid (row = 2 , column = 2 , pady = 4 )
29
+
30
+ # Button() function is used to create button widgets
31
+ submit = Button (root ,text = "submit" )
32
+ submit .grid (column = 2 ,row = 3 ,pady = "3" )
33
+ mainloop ()
You can’t perform that action at this time.
0 commit comments