On Thu, Mar 6, 2008 at 10:53 PM, Jim Walsh <[EMAIL PROTECTED]> wrote:
>
>  I think my problem is the use of overrideredirect.
>
>  I want my pythonce Tkinter window to look like all good WindowsCE windows:
>  using the top of the screen as the title bar and the little X up there.
>
>  If I use:
>     root=Tk()
>     root.wm_state('zoomed')
>
>  I get a pretty big window but still with a separate title bar wasting screen
>  space.
>
>  If I add:
>    root.overrideredirect(True)
>
>  I get a truly full screen window.  But I realized the bar across the top of
>  the screen doesn't belong to "tk" but rather to the last app.  Apparently
>  overrideredirects keeps my app out of the hands of the window manager all
>  together.
>
>  Does anyone know the best way to get a proper WinCE application appearance
>  with Tkinter?
>
>  Thanks
>  Jim W
>
>
>  Frédéric Mantegazza-2 wrote:
>  >
>  > On mercredi 05 mars 2008, Jim Walsh wrote:
>  >
>  >> I want to do something when the user taps the little "X" in the upper
>  >> right hand corner.  Can we do the default action of hiding the app?
>  >
>  > I use something like:
>  >
>  >     self.protocol("WM_DELETE_WINDOW", self._quit)
>  >
>  > to bind the X close button to my _quit() method. But I don't know how to
>  > hide the app (you mean iconify?)...
>  >
>  > --
>  >    Frédéric
>  >
>  >    http://www.gbiloba.org
>  > _______________________________________________
>  > PythonCE mailing list
>  > PythonCE@python.org
>  > http://mail.python.org/mailman/listinfo/pythonce
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Tkinter-captures-the-little-%22X%22-close-window-button--tp15852528p15873131.html
>  Sent from the Python - pythonce mailing list archive at Nabble.com.
>
>  _______________________________________________
>  PythonCE mailing list
>  PythonCE@python.org
>  http://mail.python.org/mailman/listinfo/pythonce
>

Hi Jim,

Been a while but looking at some old code, I have a work around.

What I have done (and others) is to HIDE the titlebar from view.

eg:
sizex, sizey = root.maxsize()
sizey -=25 # shift to hide titlebar
geometry = "%dx%d+0+%d" % (sizex,sizey,0)
root.geometry(geometry)
root.resizable(0,0) # disable resizing

then you can create a "button" explicitly for closing the app (place
where you wish).

This is a fudge, but hope it can help if no others respond.

Mark Doukidis
_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Reply via email to