Fwd: Re: window on aqua without a titlebar
[email protected] (Mike Ignatoski) Sun, 02 Dec 2012 23:28:27 -0500
| Newsgroups | perl.tcltk |
|---|---|
| Message-ID | <[email protected]> |
Thanks a lot, Kevin! It worked great....once I figured out that I had to put that code immediately after creating the toplevel window. If I placed the code after doing anything else with toplevel, such as setting it's geometry, it didn't work. Thanks, again! Mike ps that was fast! -------- Original Message -------- Subject: Re: window on aqua without a titlebar Date: Sun, 02 Dec 2012 23:05:07 -0500 From: Kevin Walzer <[email protected]> Reply-To: [email protected] Organization: WordTech Communications LLC To: [email protected] On 12/2/12 10:48 PM, Mike Ignatoski wrote: > In addition, I'm using the window as a tooltip/balloon hover window, so > when it's shown, I never want it to have the "focus". When I deiconfy > it on Win32, it works great, but on OS X (aqua), it shows the window and > also grabs the focus, so I have to click on the main app to return focus. The Tcl/Tk code on Aqua to achieve the effect you want looks something like this: if {[string equal [tk windowingsystem] aqua]} { ::tk::unsupported::MacWindowStyle style $top help none } where $top is a toplevel window. That doesn't grab focus. -- Kevin Walzer Code by Kevin http://www.codebykevin.com