[Tutor] Docking Windows using Python

Alan Gauld alan.gauld at btinternet.com
Sat May 30 10:07:15 CEST 2009


"Hi" <haztang17 at gmail.com> wrote

> My program will have two windows. I want to be able to dock the two so 
> they
> are side by side. I am wondering if this is doable in Python.

Yes it is doable but how difficult it is will depend on the GUI toolkit you 
use.
Most GUI programming environments nowadays (eg. .NET, Delphi etc)
include dockable windows as a standard widget. However, Tkinter,
which is the standard GUI tool in Python, does not, so you would need
to program it yourself.

There are several other GUI toolkits that you could use and I'm not sure
which, if any, support docking "out of the box", but I suspect that PyQt
and PyGTk both will, and possibly wxPython.

> someone lead me to the right direction on where to look?

The question uis not really about Python it's about GUI programming
in general. If you can't find a toolkit that suopports it natively then you
will have to do quite a lot of programming to make it work, probably
defining your own custom widget. That's a lot of work.

Your best bet is to ask the question on the various toolkit specific
forums and mailing lists since there will likely be people who have
done it already.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list