From 3c6dd6a214f4fff41f960cdd6f87f59de8d2bbe2 Mon Sep 17 00:00:00 2001 From: roadfar <839377654@qq.com> Date: Thu, 17 Sep 2020 23:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=92=E5=8F=91=E9=A1=BA=E4=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- q.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 q.py diff --git a/q.py b/q.py new file mode 100644 index 0000000..f303faf --- /dev/null +++ b/q.py @@ -0,0 +1,10 @@ +import tkinter as tk + +root = tk.Tk() +photo = tk.PhotoImage(file='images\\BJoker.gif') #创建一个图片对象 +textLabel = tk.Label(root, + text='一张牌', + justify = LEFT, #定义多行文本如何对齐。可取值有:LEFT, RIGHT, 或 CENTER + image=photo) #设置标签图片 +textLabel.pack() +root.mainloop()