how do I create a full screen window with TkInter
Jon Schull
schull at digitalgoods.com
Sun Jul 28 01:01:42 EDT 2002
What would I add to this snippet to ensure to have the image being
displayed be all we see? (no titlebar, full size, etc.)
class UI(Label):
def __init__(self, master, im):
if im.mode == "1":
# bitmap image
self.image = ImageTk.BitmapImage(im, foreground="white")
Label.__init__(self, master, image=self.image, bg="black",
bd=0)
else:
# photo image
self.image = ImageTk.PhotoImage(im)
Label.__init__(self, master, image=self.image, bd=0)
import sys
root=Tk()
filename=r'c:\temp\capture5.jpg'
im=Image.open(filename)
UI(root,im).pack()
root.mainloop()
More information about the Python-list
mailing list