-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFirstGUI.PY
More file actions
54 lines (39 loc) · 1011 Bytes
/
Copy pathFirstGUI.PY
File metadata and controls
54 lines (39 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from tkinter import *
from tkinter import messagebox
a=Tk()
a.geometry("300x300")
a.title("Registration form")
def fun():
messagebox.showinfo("Hello","Login success")
L1=Label(a,text="Name:")
L1.grid(row=0,column=0)
E1=Entry(a)
E1.grid(row=0,column=1)
L2=Label(a,text="Roll no:")
L2.grid(row=1,column=0)
E1=Entry(a)
E1.grid(row=1,column=1)
L3=Label(a,text="Branch:")
L3.grid(row=2,column=0)
C1=Checkbutton(a,text="CSE")
C1.grid(row=3,column=0)
C2=Checkbutton(a,text="AIML")
C2.grid(row=4,column=0)
L4=Label(a,text="Gender:")
L4.grid(row=5,column=0)
R1=Radiobutton(a,text="Male")
R1.grid(row=6,column=0)
R1.select()
R2=Radiobutton(a,text="Female")
R2.grid(row=7,column=0)
R2.deselect()
L5=Label(a,text="Programming Language:")
L5.grid(row=8,column=1)
Lb=Listbox(a,height=3)
Lb.insert(1,"Python")
Lb.insert(2,"Java")
Lb.insert(3,"C++")
Lb.grid(row=9,column=1)
b=Button(a,text="submit",command=fun)
b.grid(row=10,column=1)
a.mainloop()