Decorate un Frame with window managers title bar, etc en Tkinter 8.5

C

craf

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.

I appreciate any of this item

Regards.


Cristian Abarzúa
 
E

Eric Brunel

craf said:
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()

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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top