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
f2ab0d5e
authored
Aug 19, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
75d53087
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
my_window.py
my_window.py
View file @
f2ab0d5e
import
tkinter
def
c
():
name
=
e1
.
get
()
name1
=
e2
.
get
()
print
(
"输入的用户名为"
+
name
)
print
(
"输入的密码为"
+
name1
)
print
(
"已成功提交"
)
# 建立窗口对象
root
=
tkinter
.
Tk
()
...
...
@@ -30,6 +37,8 @@ lab2.place(x=40,y=140)
lab3
=
tkinter
.
Label
(
root
,
text
=
'请确认密码'
,
font
=
(
'宋体'
,
10
),
fg
=
"black"
,
width
=
8
,
height
=
1
,
bg
=
"green"
)
lab3
.
place
(
x
=
40
,
y
=
200
)
b
=
tkinter
.
Button
(
root
,
text
=
"提交"
,
fg
=
"green"
,
width
=
15
,
command
=
c
)
b
.
place
(
x
=
150
,
y
=
250
)
root
.
resizable
(
width
=
True
,
height
=
True
)
# 保持窗口监听,进入消息循环
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