Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson17-diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
43156486
authored
Feb 12, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
4bc70122
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletions
my_window.py
name.txt
s.py
my_window.py
View file @
43156486
import
tkinter
def
register
():
name
=
e
.
get
()
# if(e1.get()==e2.get()):
number
=
e1
.
get
()
number2
=
e2
.
get
()
print
(
name
,
number
,
number2
)
root
=
tkinter
.
Tk
()
root
.
title
(
'注册'
)
root
.
geometry
(
'500x300+600+400'
)
root
.
geometry
(
'400x320+500+300'
)
e
=
tkinter
.
Entry
(
root
,
show
=
None
,
font
=
(
'宋体'
,
14
),
bg
=
'light blue'
,
width
=
18
)
e
.
place
(
x
=
140
,
y
=
80
)
e1
=
tkinter
.
Entry
(
root
,
show
=
'*'
,
font
=
(
'宋体'
,
14
),
bg
=
'light blue'
,
width
=
18
)
e1
.
place
(
x
=
140
,
y
=
120
)
e2
=
tkinter
.
Entry
(
root
,
show
=
"*"
,
font
=
(
'宋体'
,
14
),
bg
=
'light blue'
,
width
=
18
)
e2
.
place
(
x
=
140
,
y
=
160
)
s
=
tkinter
.
Label
(
root
,
text
=
'您好!请先注册'
,
font
=
(
'宋体'
,
14
),
fg
=
'red'
,
width
=
40
,
height
=
2
,
bg
=
'green'
)
s
.
place
(
x
=
0
,
y
=
0
)
s1
=
tkinter
.
Label
(
root
,
text
=
'用户名:'
,
font
=
(
'宋体'
,
14
),
fg
=
'red'
)
s1
.
place
(
x
=
50
,
y
=
77
)
s2
=
tkinter
.
Label
(
root
,
text
=
'密码:'
,
font
=
(
'宋体'
,
14
),
fg
=
'red'
)
s2
.
place
(
x
=
65
,
y
=
117
)
s3
=
tkinter
.
Label
(
root
,
text
=
'确认密码:'
,
font
=
(
'宋体'
,
14
),
fg
=
'red'
)
s3
.
place
(
x
=
30
,
y
=
157
)
b
=
tkinter
.
Button
(
root
,
text
=
'提交'
,
bg
=
"blue"
,
width
=
15
,
command
=
register
)
b
.
place
(
x
=
150
,
y
=
250
)
root
.
mainloop
()
name.txt
0 → 100644
View file @
43156486
s.py
0 → 100644
View file @
43156486
import
tkinter
def
check
():
number
=
e
.
get
()
print
(
'你的手机号码是'
,
number
)
t
=
tkinter
.
Tk
()
t
.
title
(
'手机验证'
)
t
.
geometry
(
'400x100+500+300'
)
t
.
resizable
(
width
=
False
,
height
=
False
)
e
=
tkinter
.
Entry
(
t
,
show
=
"㊙"
,
font
=
(
'宋体'
,
14
),
bg
=
'light blue'
,
width
=
24
)
e
.
place
(
x
=
70
,
y
=
30
)
e1
=
tkinter
.
Label
(
t
,
text
=
'手机号码:'
,
font
=
(
'宋体'
,
9
))
e1
.
place
(
x
=
0
,
y
=
30
)
e2
=
tkinter
.
Button
(
t
,
text
=
'确认'
,
font
=
(
'宋体'
,
9
),
bg
=
'light green'
,
width
=
10
,
height
=
1
,
command
=
check
)
e2
.
place
(
x
=
120
,
y
=
70
)
t
.
mainloop
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment