imagedemo.py 文件源码

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

项目:ISCPP 作者: simondlevy 项目源码 文件源码
def __init__(self):
        """Sets up the window and widgets."""
        EasyFrame.__init__(self, title = "Image Demo")
        self.setResizable(False)
        imageLabel = self.addLabel(text = "",
                                   row = 0, column = 0,
                                   sticky = N+S+W+E)
        textLabel = self.addLabel(text = "Smokey the cat",
                                  row = 1, column = 0,
                                  sticky = N+S+W+E)

        # Load the image and associate it with the image label.
        self.image = PhotoImage(file = "smokey.gif")
        imageLabel["image"] = self.image

        # Set the font and color of the caption.
        font = Font(family = "Verdana", size = 20, slant = "italic")
        textLabel["font"] = font
        textLabel["foreground"] = "blue"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号