Commit e830a9d2 by BellCodeEditor

save project

parent 41eaa8df
Showing with 7 additions and 1 deletions
...@@ -29,10 +29,12 @@ class Note(): ...@@ -29,10 +29,12 @@ class Note():
# 设置初始y坐标为20 # 设置初始y坐标为20
# 使用for循环遍历列表的文字 # 使用for循环遍历列表的文字
for i in alist:
# 使用create_text()方法参数为x,y坐标为(40,y) 文字text 字体font=("宋体",11) 对其方式anchor为W 字体颜色fill为红色 # 使用create_text()方法参数为x,y坐标为(40,y) 文字text 字体font=("宋体",11) 对其方式anchor为W 字体颜色fill为红色
self.canvas.create_text(40,self.y,text=i,font("宋体",11),anchor=W,fill='#FF9900 ')
# 循环一次y坐标自增20 # 循环一次y坐标自增20
self.y+=20
def get_info(self): def get_info(self):
...@@ -41,3 +43,7 @@ class Note(): ...@@ -41,3 +43,7 @@ class Note():
app = Note() app = Note()
app.show() app.show()
app.root.mainloop() app.root.mainloop()
self.canvas.create_text(40,self.y,text=i,font("宋体",11),anchor=W,fill='#FF9900 ')
self.+
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment