Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson19-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
6ce0f439
authored
Dec 14, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6644d08b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
client.py
client.py
View file @
6ce0f439
...
@@ -9,8 +9,15 @@ class Note(): # 便签、笔记
...
@@ -9,8 +9,15 @@ class Note(): # 便签、笔记
self
.
root
.
geometry
(
'300x340+1000+200'
)
self
.
root
.
geometry
(
'300x340+1000+200'
)
self
.
root
.
title
(
"我的便签-待办事项"
)
self
.
root
.
title
(
"我的便签-待办事项"
)
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
self
.
img
=
tkinter
.
PhotoImage
(
file
=
"bg.png"
)
#下载图片
def
show
(
self
):
# 布置窗口界面
def
show
(
self
):
# 布置窗口界面
self
.
cav
=
tkinter
.
Canvas
(
self
.
root
,
width
=
300
,
height
=
340
)
#创建画布
self
.
cav
.
create_image
(
0
,
0
,
image
=
self
.
img
,
anchor
=
"nw"
)
#给画布上放置图片
self
.
cav
.
place
(
x
=
0
,
y
=
0
)
#放置画布
self
.
y
=
20
for
i
in
alist
:
#放置文字
self
.
cav
.
create_text
(
40
,
self
.
y
,
text
=
i
,
font
=
(
"宋体"
,
15
),
anchor
=
"w"
,
fill
=
"blue"
)
self
.
y
+=
30
# 输入框
# 输入框
self
.
ent
=
tkinter
.
Entry
(
self
.
root
,
show
=
None
,
self
.
ent
=
tkinter
.
Entry
(
self
.
root
,
show
=
None
,
font
=
(
'宋体'
,
13
),
bg
=
"snow"
,
width
=
25
)
font
=
(
'宋体'
,
13
),
bg
=
"snow"
,
width
=
25
)
...
@@ -21,7 +28,13 @@ class Note(): # 便签、笔记
...
@@ -21,7 +28,13 @@ class Note(): # 便签、笔记
self
.
but
.
place
(
x
=
240
,
y
=
305
)
self
.
but
.
place
(
x
=
240
,
y
=
305
)
def
get_info
(
self
):
def
get_info
(
self
):
pass
self
.
s
=
self
.
ent
.
get
()
#获取输入框的内容
s
=
len
(
self
.
s
)
self
.
ent
.
delete
(
"0"
,
str
(
s
))
#清空输入框
if
self
.
s
!=
""
:
#不为空才能添加
alist
.
append
(
self
.
s
)
self
.
cav
.
create_text
(
40
,
self
.
y
,
text
=
self
.
s
,
font
=
(
"宋体"
,
15
),
anchor
=
"w"
,
fill
=
"blue"
)
self
.
y
+=
30
app
=
Note
()
app
=
Note
()
app
.
show
()
app
.
show
()
...
...
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