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"
评论列表
文章目录