fullscreen in Tkinter on Mac [OS X]
James Eagan
eaganj at bazza.com
Wed Jun 4 16:19:38 EDT 2003
Hi,
please forgive me if this is the wrong place for this. I'm trying to make a
fullscreen toplevel window in Tkinter on Mac OS X (for the fullscreen mode of
a slideshow-like tool). The archives suggest just using
root.geometry("wxh+0+0") (where wxh is the dims of the screen), but, at least
on my Mac OS X machine, that gives me a fullscreen window under the titlebar
and dock.
Any suggestions for how to make a fullscreen window that covers up everything
else (specifically, menubar, dock)?
Small sample code follows:
import Tkinter as Tk
root = Tk.Tk()
root.overrideredirect(True)
label = Tk.Label(root, text='lalala', foreground='red', background='black')
label.pack(expand=True, fill='both', anchor='center')
root.geometry('%sx%s+%s+%s' % (root.winfo_screenwidth(),
root.winfo_screenheight(),
0, 0))
root.lift()
Tk.mainloop()
More information about the Python-list
mailing list