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
205b3b78
authored
Jul 13, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
bc4a3544
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
my_window.py
my_window.py
View file @
205b3b78
import
tkinter
def
win
():
username
=
in_1
.
get
()
password
=
in_2
.
get
()
password2
=
in_3
.
get
()
print
(
"你输入的信息为:"
+
username
\
n
)
root
=
tkinter
.
Tk
()
#创建窗口
root
.
title
(
'用户注册系统'
)
#标题
root
.
geometry
(
'400x300+500+250'
)
#大小及位置
...
...
@@ -29,17 +35,22 @@ note_1.place(x=0,y=0)
note_2
=
tkinter
.
Label
(
root
,
text
=
"账户:"
,
font
=
(
"宋体"
,
10
),
fg
=
"black"
,
width
=
10
,
height
=
2
)
note_2
.
place
(
x
=
20
,
y
=
70
)
note_2
.
place
(
x
=
15
,
y
=
70
)
note_3
=
tkinter
.
Label
(
root
,
text
=
"密码"
,
note_3
=
tkinter
.
Label
(
root
,
text
=
"密码
:
"
,
font
=
(
"宋体"
,
10
),
fg
=
"black"
,
width
=
10
,
height
=
2
)
note_3
.
place
(
x
=
20
,
y
=
130
)
note_3
.
place
(
x
=
15
,
y
=
130
)
note_4
=
tkinter
.
Label
(
root
,
text
=
"确认密码"
,
note_4
=
tkinter
.
Label
(
root
,
text
=
"确认密码
:
"
,
font
=
(
"宋体"
,
10
),
fg
=
"black"
,
width
=
10
,
height
=
2
)
note_4
.
place
(
x
=
20
,
y
=
190
)
note_4
.
place
(
x
=
15
,
y
=
190
)
#提交信息
button1
=
tkinter
.
Button
(
root
,
text
=
"提交"
,
bg
=
"MediumPurple"
,
width
=
15
,
command
=
win
)
button1
.
place
(
x
=
145
,
y
=
230
)
root
.
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