[Fwd: Re: Decorate un Frame with window managers title bar, etc en Tkinter 8.5]

craf prog at vtr.net
Thu Dec 2 07:54:50 EST 2010


--------- Mensaje reenviado --------
> De: Eric Brunel <eric.brunel at pragmadev.nospam.com>
> Para: python-list at python.org
> Asunto: Re: Decorate un Frame with window managers title bar, etc en
> Tkinter 8.5
> Fecha: Thu, 02 Dec 2010 10:21:49 +0100
> Grupos de noticias: comp.lang.python
> 
> In article <mailman.101.1291218554.2649.python-list at python.org>,
>  craf <prog at vtr.net> wrote:
> 
> > Hi.
> > 
> > I use python 3.1 and Tkinter 8.5 in Ubuntu 9.10 
> > 
> > I would like to turn a frame into a toolbox,
> > ,and for that I read that you can use the command wm manage (window)
> > 
> > The information can be found  at:
> > http://www.tcl.tk/man/tcl8.5/TkCmd/wm.htm#M39
> > 
> > the explanation says:
> > 
> > wm manage widget:
> >         The widget specified will become a stand alone top-level window.
> >         The window will be decorated with the window managers title bar,
> >         etc. Only frame, labelframe and toplevel widgets can be used
> >         with this command. Attempting to pass any other widget type will
> >         raise an error. Attempting to manage a toplevel widget is benign
> >         and achieves nothing. See also GEOMETRY MANAGEMENT.
> >         
> > I have tried to use it in Tkinter but I can not know how is its
> > structure.
> > 
> > In Tkinter should be:
> > 
> > ---TEST CODE-------------------
> > 
> > from Tkinter import
> > 
> > master = Tk()
> > frame = Frame(master)
> > wm_manager(Frame)
> > master.mainloop()
> > 
> > --------------------------------
> > 
> > But this does not work.
> 
> If your version of Tkinter supports it, then the correct syntax is:
> frame.wm_manage()
> Please note you have to call it on the Frame instance (the one you named 
> frame), and not on Frame with a big F which is the class.
> 
> If it says the method doesn't exist (AttributeError raised on the line 
> frame.wm_manage()), you can also try to do it at tcl/tk level with the 
> line:
> master.tk.call('wm', 'manage', frame)
> 
> > I appreciate any of this item
> 
> HTH
>  - Eric -

Thank you very much Eric!

Regards.

Cristian.




More information about the Python-list mailing list