Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson20-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
d1981c0a
authored
May 03, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
bd56d887
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
code.py
code.py
View file @
d1981c0a
...
...
@@ -48,7 +48,9 @@ class My_login(): # 登录窗口
self
.
root
=
tkinter
.
Tk
()
self
.
root
.
title
(
"登录窗口"
)
self
.
root
.
geometry
(
'400x300+500+300'
)
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
# True可以拉伸,False不能拉伸
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
self
.
bg_img
=
tkinter
.
PhotoImage
(
file
=
"bg.png"
)
self
.
box
=
PhotoImage
(
file
=
'box.png'
)
# True可以拉伸,False不能拉伸
def
show
(
self
):
# 登录界面的所有控件
# Label文本标签,界面提示信息
...
...
@@ -69,7 +71,8 @@ class My_login(): # 登录窗口
width
=
18
)
# 显示成密文形式
self
.
e1
.
place
(
x
=
120
,
y
=
80
)
self
.
e2
.
place
(
x
=
120
,
y
=
140
)
self
.
val
=
0
self
.
v
=
IntVar
()
# 登录、注册按钮
button1
=
tkinter
.
Button
(
self
.
root
,
text
=
'登录'
,
bg
=
"lightblue"
,
fg
=
"black"
,
width
=
15
,
command
=
login
)
...
...
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