Tkinter Geometry Management and Other Basics
As I understand it, there are three geometry managers: Grids, Pack and Place. Only the first two are of interest.
Is it possible to mix them? I don't think so, but maybe I'm missing something. Generally, they seem to apply with respect to a Frame, so I would think only one geometry can be used in a Frame. However, if one is used for frameA and another for frameB, can they both be used with in a parent frame, which has its own geometry (grid or pack)?
Suppose I want a parent frame to have a title and below it a 2 column grid with say a Label and Entry. I put the latter in a frame combo in a frame, and attach it to the parent. Do I need to put the title/label in a frame and do the same?
Grid and pack cannot be mixed within the same parent widget. This may or may not be a frame. It could also be a canvas, or other such widgets. It is possible to mix parent widgets which have different geometry managers. So yes, your situation with having two frames with different geometry would work. Just be sure never to mix the managers within the same parent widget. Otherwise all creation comes to an end 8-O ----- --------------------------------------------------- "I'd like to share a revelation that I've had during my time here. It came to me when I tried to classify your species and I realized that you're not actually mammals." -- Agent Smith -- View this message in context: http://www.nabble.com/Tkinter-Geometry-Management-and-Other-Basics-tp2272496... Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
"VladPotrosky" <greendingbat99@hotmail.com> wrote
As I understand it, there are three geometry managers: Grids, Pack and Place. Only the first two are of interest.
There is now a fourth, the form manager, as of Python 2.7/3.1... Haven't used it yet so cannot comment on how genuinely useful it is. And to the OP, yes you can definitely mix the manager provided you keep to one per container. I typically use pack to pack a set of frames into my top level app. But within each of the subframes I then use grid/pack as suits my needs, often (usually?) a mx of both in a single app. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/
2009/7/25 Alan Gauld <alan.gauld@btinternet.com>:
"VladPotrosky" <greendingbat99@hotmail.com> wrote
As I understand it, there are three geometry managers: Grids, Pack and Place. Only the first two are of interest.
There is now a fourth, the form manager, as of Python 2.7/3.1...
What is this "form manager" ? Probably not the one from Tix, since it is has been in Python for more than 8 years.
Haven't used it yet so cannot comment on how genuinely useful it is.
And to the OP, yes you can definitely mix the manager provided you keep to one per container. I typically use pack to pack a set of frames into my top level app. But within each of the subframes I then use grid/pack as suits my needs, often (usually?) a mx of both in a single app.
-- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/
-- -- Guilherme H. Polo Goncalves
There is now a fourth, the form manager, as of Python 2.7/3.1...
What is this "form manager" ? Probably not the one from Tix, since it is has been in Python for more than 8 years.
It could be the same, I didn't know Tix had a form manager. I only noticed it while reading the Whats New stuff for Python 3.1/2.7. ISTR It was listed amongst the info about ttk.
Haven't used it yet so cannot comment on how genuinely useful it is.
Alan G.
2009/7/26 ALAN GAULD <alan.gauld@btinternet.com>:
There is now a fourth, the form manager, as of Python 2.7/3.1...
What is this "form manager" ? Probably not the one from Tix, since it is has been in Python for more than 8 years.
It could be the same, I didn't know Tix had a form manager. I only noticed it while reading the Whats New stuff for Python 3.1/2.7. ISTR It was listed amongst the info about ttk.
If that information is listed there then there is something wrong. But I only see a short note about the ttk module: "Added a new module, tkinter.ttk for access to the Tk themed widget set. The basic idea of ttk is to separate, to the extent possible, the code implementing a widget’s behavior from the code implementing its appearance."
Alan G.
Regards, -- -- Guilherme H. Polo Goncalves
It could be the same, I didn't know Tix had a form manager. I only noticed it while reading the Whats New stuff for Python 3.1/2.7. ISTR It was listed amongst the info about ttk.
If that information is listed there then there is something wrong. But I only see a short note about the ttk module: "Added a new module, tkinter.ttk for access to the Tk themed widget set. The basic idea of
I've had another look - it was a few weeks ago - and I think what has happened is that I've gone off to the Tk docs site to look up ttk (the Tk Docs site has the look n feel that I remember) and must have clicked my way into the Tix pages and seen form there. Not having used tix before I just assumed it was a new Tk manager. My bad, apologies for any confusion caused, Alan G.
participants (5)
-
Alan Gauld -
ALAN GAULD -
Guilherme Polo -
VladPotrosky -
Wayne Watson