Hi,

On Sat, 24 Jul 2010 03:41:21 -0700 (PDT)
petroff <petr...@seznam.cz> wrote:

> 
> I want to allow changing in (sorted) list of buttons:
> self.ADRbuttons=[B1,B2...]
> REMOVE => button.destroy (it works correctly)
> ADD is a problem; I don't know how to insert button on correct
> location in button panel (pack method)

This sounds like the grid() geometry manager is the perfect tool for
you, is there any special reason why you want to use pack() instead?
With grid() you could easily do something like:

for i in range(len(self.datADR)):
    new = Button(self)
    new.grid(row=0, column=i)
    self.ADRbuttons.append(new)

If you want to change the location of a button later, simply call grid()
again with the new row and column.

I hope this helps

Michael

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to