-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathttk.py
More file actions
56 lines (56 loc) · 1.71 KB
/
Copy pathttk.py
File metadata and controls
56 lines (56 loc) · 1.71 KB
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
55
56
from tkinter import *
from tkinter import ttk
root = Tk()
root.title('ebi')
root.geometry("400x400")
root.config(bg='gray25')
l = Label(root, text='name :', bg='gray25', fg='snow')
l.place(x=20, y=20)
o = Label(root, text='LASTname :', bg='gray25', fg='snow')
o.place(x=20, y=50)
z = Label(root, text='age :', bg='gray25', fg='snow')
z.place(x=35, y=80)
pas = Label(root, text='gender :', bg='gray25', fg='snow')
pas.place(x=35, y=110)
pas = Label(root, text='job :', bg='gray25', fg='snow')
pas.place(x=35, y=150)
pas3 = Label(root, text='Gmail :', bg='gray25', fg='snow')
pas3.place(x=35, y=180)
pas55 = Label(root, text='more :', bg='gray25', fg='snow')
pas55.place(x=35, y=210)
e = Entry(root, bd=3)
e.place(x=70, y=20)
k = Entry(root, bd=3)
k.place(x=85, y=50)
i = Spinbox(root, bd=3, from_=0, to_=150)
i.place(x=70, y=80)
s = Entry(root, bd=3)
s.place(x=85, y=180)
t = Text(root, width=20, height=5)
t.place(x=90, y=215)
combo = ttk.Combobox(root, values=["OSTAD", "TRIDER", "DOCTOR", "KAREGAR", "DALACK"])
combo.place(x=85, y=150)
u = StringVar()
u.set(None)
w = Radiobutton(root, text='male ', bg='gray25', variable=u, value='male')
w2 = Radiobutton(root, text='female ', bg='gray25', variable=u, value='female')
w.place(x=85, y=110)
w2.place(x=150, y=110)
def read():
name = e.get()
lastname = k.get()
age = i.get()
gender = u.get()
job = combo.get()
gmail = s.get()
more = t.get('1.0', END)
print("Name:", name)
print("Last Name:", lastname)
print("Age:", age)
print("Gender:", gender)
print("Job:", job)
print("Gmail:", gmail)
print("More Info:", more)
kk = Button(root, width=5, height=3, bg='black', fg='snow', text='submit', command=read)
kk.place(x=300, y=300)
root.mainloop()