GUIapp.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:StackIt 作者: poppu-mtg 项目源码 文件源码
def __init__(self):
        self.image1 = Image.open(mGui.btn2text.get()[9:] + '-scroll.png')
        w1, h1 = self.image1.size
        self.imagefull = Image.new("RGB", (w1 * 2, h1), "black")
        self.imagefull.paste(self.image1, (0, 0))
        self.imagefull.paste(self.image1, (w1, 0))

        self.photo1 = ImageTk.PhotoImage(self.imagefull)
        width1 = self.photo1.width()
        height1 = self.photo1.height()

        novi1 = Toplevel()
        self.canvas1 = Canvas(novi1, width=1980, height=34)
        self.canvas1.pack(expand=1, fill=BOTH) # <--- Make your canvas expandable.
        x = (width1)/2.0
        y = (height1)/2.0
        self.item = self.canvas1.create_image(x, y, image=self.photo1) # <--- Save the return value of the create_* method.
        self.x00, self.y00 = self.canvas1.coords(self.item)
        self.canvas1.bind('<Button-1>', self.next_image)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号