470,604 Members | 2,024 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,604 developers. It's quick & easy.

Want to re-pack() a Frame displaying a collection


I'd like to do the following with Tkinter's Frame() object:

1. Display a collection of pack()-able objects. Easy. Done. I hold
the objects in a dictionary, mostly so that the owning program can refer
to them uniformly.

2. Whenever the collection is added to or deleted from, re-pack() the
owning object.

Will this happen automatically simply whenever I add or delete from the
object's __dict__, or do I need to add to __setattr__ and __delattr__ to
detect when the user has added or removed an object?


Not Quite Related:

I'm doing a lot of displaying of (Label, Entry) pairs so I've another
subclass of Frame() that simplifies that action for me. These are items
from a collection that's created at runtime where the labels aren't
known in advance.

Right now, I'm raising an exception if grid() or place() is called on
the object. Eventually, what I'd like to do is flesh out the grid() and
place() methods so that the Label and Entry are placed in what I think
are sensible default positions reletive to the desired placement.

With grid(), how do I determine my current column and row in the case
when grid() is invoked without arguments?

With place() . .pretty much the same song. I need to determine my
position so that I can Do The Right Thing (or at least the expected


Mar 19 '06 #1
0 982

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Malcolm | last post: by
5 posts views Thread by Frame | last post: by
17 posts views Thread by kimimaro | last post: by
7 posts views Thread by Philip Wagenaar | last post: by
6 posts views Thread by Andy | last post: by
2 posts views Thread by Balamurali C | last post: by
1 post views Thread by michelqa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.