Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Python

Tkinter fullscreen with Mac OS X

 
Jump to:  
 
C Martin
PostPosted: Mon Jul 28, 2008 11:10 pm    Post subject: Tkinter fullscreen with Mac OS X
       
Is there a way to create a full screen app using Tkinter with Mac OS
X?? On windows, this is relatively easy with overrideredirect(1).
However, on the Mac, the top menu bar and dock are still displayed
over the app. Is there a way to get rid of them?

Thanks.
 

 
Guilherme Polo
PostPosted: Mon Jul 28, 2008 11:10 pm    Post subject: Re: Tkinter fullscreen with Mac OS X
       
On Mon, Jul 28, 2008 at 8:10 PM, C Martin <g.threepwood@gmail.com> wrote:
Quote:
Is there a way to create a full screen app using Tkinter with Mac OS
X?? On windows, this is relatively easy with overrideredirect(1).
However, on the Mac, the top menu bar and dock are still displayed
over the app. Is there a way to get rid of them?


You could try this, supposing tl is a toplevel:

tl.tk.call("::tk::unsupported::MacWindowStyle", "style", tl._w, "plain", "none")

and if you are using python with tk 8.5 or newer (unlikely):

tl.wm_attributes('-fullscreen', 1)

But I don't have a mac, so I can't say for sure if these solve your problem.

Quote:
Thanks.
--
LINK




--
-- Guilherme H. Polo Goncalves
 

 
C Martin
PostPosted: Thu Aug 07, 2008 12:37 am    Post subject: Re: Tkinter fullscreen with Mac OS X
       
On Jul 28, 6:43 pm, "Guilherme Polo" <ggp...@gmail.com> wrote:
Quote:

You could try this, supposing tl is a toplevel:

tl.tk.call("::tk::unsupported::MacWindowStyle", "style", tl._w, "plain", "none")


I tried this (although, my tl is actually a tk instance):

self.tk.call("::tk::unsupported::MacWindowStyle", "style", self.tk._w,
"plain", "none")

and get this message:

Traceback (most recent call last):
File "./ProgramCountdown.py", line 120, in <module>
control = Controller(tk)
File "./ProgramCountdown.py", line 37, in __init__
self.tk.call("::tk::unsupported::MacWindowStyle", "style",
self.tk._w, "plain", "none")
_tkinter.TclError: bad class: should be alert, moveableAlert, modal,
moveableModal, floating, help, or document

Any thoughts? Can you do something similar on the tk instance itself?
 

 
Kevin Walzer
PostPosted: Thu Aug 07, 2008 7:20 pm    Post subject: Re: Tkinter fullscreen with Mac OS X
       
C Martin wrote:
Quote:
On Jul 28, 6:43 pm, "Guilherme Polo" <ggp...@gmail.com> wrote:
You could try this, supposing tl is a toplevel:

tl.tk.call("::tk::unsupported::MacWindowStyle", "style", tl._w, "plain", "none")


I tried this (although, my tl is actually a tk instance):

self.tk.call("::tk::unsupported::MacWindowStyle", "style", self.tk._w,
"plain", "none")

and get this message:

Traceback (most recent call last):
File "./ProgramCountdown.py", line 120, in <module
control = Controller(tk)
File "./ProgramCountdown.py", line 37, in __init__
self.tk.call("::tk::unsupported::MacWindowStyle", "style",
self.tk._w, "plain", "none")
_tkinter.TclError: bad class: should be alert, moveableAlert, modal,
moveableModal, floating, help, or document

Any thoughts? Can you do something similar on the tk instance itself?



Try something like this (assuming self.tk._w is the name of your window):

self.tk._w.wm_attributes(fullscreen='true')

--
Kevin Walzer
Code by Kevin
LINK
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

gry dla dziewczyn życzenia walentynkowe Dieta polskie miasta szkolenia bhp