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
b396aeb7
authored
Jan 30, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
0651e310
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
data.txt
my_window.py
data.txt
0 → 100644
View file @
b396aeb7
qwertyuiopasdfghjklzxcvbnmwertyuiopasdfghjklzxcvbnm
\ No newline at end of file
my_window.py
View file @
b396aeb7
import
tkinter
import
tkinter
def
register
():
name
=
e1
.
get
()
password
=
e2
.
get
()
with
open
(
"data.txt"
,
"w"
,
encoding
=
"utf-8"
)
as
file
:
file
.
write
(
name
)
file
.
write
(
password
)
root
=
tkinter
.
Tk
()
root
.
title
(
"注册"
)
root
.
geometry
(
"480x360+680+300"
)
root
.
resizable
(
width
=
False
,
height
=
False
)
eee
=
tkinter
.
Button
(
root
,
text
=
"提交"
,
bg
=
"white"
,
width
=
15
,
command
=
register
)
eee
.
place
(
x
=
175
,
y
=
250
)
lab
=
tkinter
.
Label
(
root
,
text
=
"您好,请输入注册信息"
,
font
=
(
"宋体"
,
16
),
fg
=
"green"
,
width
=
45
,
height
=
2
,
bg
=
"black"
)
lab
.
place
(
x
=
0
,
y
=
0
)
e1
=
tkinter
.
Entry
(
root
,
show
=
None
,
font
=
(
"宋体"
,
14
),
bg
=
"light grey"
,
width
=
18
)
e1
.
place
(
x
=
150
,
y
=
70
)
lab1
=
tkinter
.
Label
(
root
,
text
=
"署名:"
,
font
=
(
"宋体"
,
16
),
fg
=
"green"
,
width
=
5
,
height
=
2
)
lab1
.
place
(
x
=
80
,
y
=
60
)
e2
=
tkinter
.
Entry
(
root
,
show
=
" "
,
font
=
(
"宋体"
,
14
),
bg
=
"light grey"
,
width
=
18
)
e2
.
place
(
x
=
150
,
y
=
120
)
lab2
=
tkinter
.
Label
(
root
,
text
=
"密码:"
,
font
=
(
"宋体"
,
16
),
fg
=
"green"
,
width
=
5
,
height
=
2
)
lab2
.
place
(
x
=
80
,
y
=
110
)
e3
=
tkinter
.
Entry
(
root
,
show
=
" "
,
font
=
(
"宋体"
,
14
),
bg
=
"light grey"
,
width
=
18
)
e3
.
place
(
x
=
150
,
y
=
170
)
lab3
=
tkinter
.
Label
(
root
,
text
=
"启动:"
,
font
=
(
"宋体"
,
16
),
fg
=
"green"
,
width
=
5
,
height
=
2
)
lab3
.
place
(
x
=
79
,
y
=
160
)
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