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
aba9caa7
authored
Nov 26, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
d342feb7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
my_client.py
quiz.py
my_client.py
View file @
aba9caa7
...
...
@@ -7,8 +7,8 @@ alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
class
Note
():
# 便签、笔记
def
__init__
(
self
):
self
.
root
=
tkinter
.
Tk
()
self
.
root
.
geometry
(
'300x340
+1000+200
'
)
self
.
root
.
title
(
"
我的便签-待办事项
"
)
self
.
root
.
geometry
(
'300x340'
)
self
.
root
.
title
(
"
罗靖翔的档案
"
)
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
self
.
bg_img
=
tkinter
.
PhotoImage
(
file
=
"bg.png"
)
...
...
@@ -27,6 +27,8 @@ class Note(): # 便签、笔记
self
.
but
.
place
(
x
=
240
,
y
=
305
)
# 展示所有的文字
self
.
y
=
20
self
.
val
=
0
self
.
v
=
IntVar
()
for
info
in
alist
:
self
.
canvas
.
create_text
(
40
,
self
.
y
,
text
=
info
,
font
=
(
"宋体"
,
11
),
anchor
=
W
,
fill
=
'#FF9900'
)
...
...
quiz.py
View file @
aba9caa7
...
...
@@ -10,10 +10,14 @@ def func():
print
(
"你选择了:"
,
num
)
v
=
tkinter
.
IntVar
()
rb1
=
tkinter
.
Radiobutton
(
root
,
text
=
'体育'
,
value
=
1
,
variable
=
v
,
command
=
func
)
rb2
=
tkinter
.
Radiobutton
(
root
,
text
=
'美术'
,
value
=
2
,
variable
=
v
,
command
=
func
)
rb3
=
tkinter
.
Radiobutton
(
root
,
text
=
'音乐'
,
value
=
3
,
variable
=
v
,
command
=
func
)
rb4
=
tkinter
.
Radiobutton
(
root
,
text
=
'编程'
,
value
=
4
,
variable
=
v
,
command
=
func
)
rb1
=
tkinter
.
Radiobutton
(
root
,
text
=
'罗靖翔出生了'
,
value
=
1
,
variable
=
v
,
command
=
func
)
rb2
=
tkinter
.
Radiobutton
(
root
,
text
=
'罗靖翔的成长'
,
value
=
2
,
variable
=
v
,
command
=
func
)
rb3
=
tkinter
.
Radiobutton
(
root
,
text
=
'罗靖翔结婚了'
,
value
=
3
,
variable
=
v
,
command
=
func
)
rb4
=
tkinter
.
Radiobutton
(
root
,
text
=
'罗靖翔和他老婆生了一个儿子和一个女儿'
,
value
=
4
,
variable
=
v
,
command
=
func
)
rb5
=
tkinter
.
Radiobutton
(
root
,
text
=
'罗靖翔带他全家去环游世界'
,
value
=
5
,
variable
=
v
,
command
=
func
)
rb6
=
tkinter
.
Radiobutton
(
root
,
text
=
'他们先去日本喝核废水'
,
value
=
6
,
variable
=
v
,
command
=
func
)
rb7
=
tkinter
.
Radiobutton
(
root
,
text
=
'再去缅北嘎腰'
,
value
=
7
,
variable
=
v
,
command
=
func
)
rb8
=
tkinter
.
Radiobutton
(
root
,
text
=
''
,
value
=
8
,
variable
=
v
,
command
=
func
)
# ++++++++++++++++++++++++++++++++++++++++
rb1
.
place
(
x
=
50
,
y
=
50
)
rb2
.
place
(
x
=
50
,
y
=
100
)
...
...
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