Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson17-diy3
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
ecf909d2
authored
Jan 21, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
94d0cd2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
my_window.py
my_window.py
View file @
ecf909d2
import
tkinter
def
register
():
name
=
e1
.
get
()
print
(
"提交用户名是:"
,
name
)
name1
=
e2
.
get
()
print
(
"密码是:"
,
name1
)
name2
=
e3
.
get
()
print
(
"确认密码是:"
,
name2
)
# 建立窗口对象
root
=
tkinter
.
Tk
()
...
...
@@ -29,6 +38,7 @@ lab2.place(x=10,y=140)
lab3
=
tkinter
.
Label
(
root
,
text
=
'确认密码'
,
font
=
(
'宋体'
,
15
),
fg
=
"black"
,
height
=
2
)
lab3
.
place
(
x
=
10
,
y
=
200
)
button1
=
tkinter
.
Button
(
root
,
text
=
'提交'
,
bg
=
"lightgreen"
,
width
=
15
,
command
=
register
())
button1
.
place
(
150
,
250
)
root
.
resizable
(
width
=
False
,
height
=
False
)
root
.
mainloop
()
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