On Mon, 2002-06-17 at 20:19, Gary Jaffe wrote:
> I create a GtkTable and attach a GtkLabel in it with
> 
> table.attach(GtkLabel("label #1"), 0, 1, 0, 1)
> 
> I then try to change the label with
> 
> table.attach(GtkLabel("label #2), 0, 1, 0, 1)
> mainWin.show_all()
> 
> I get the label #2 written on top of the label #1.  Is there a way of clearing 
> the label #1 from the table before attaching label #2 so that the table could 
> be more dynamic?  I don't want to put a GtkEntry there, because I want the 
> background of the table to be the same as the background of the main window.

You need to either call 
label.set('label #2') 
or 
old_label.destroy()
table.attach(GtkLabel("label #2), 0, 1, 0, 1)

Either way you'll need to track the tables children better, either by
naming them then using get_widget(<name>) or by looking through the
children manually to find the right one based on the current label, or
something else that may be unique.

> 
> Thanks for any help.
> 
> Gary
> [EMAIL PROTECTED]
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure                   430 10th St NW
Racemi                          Suite N-210
http://www.racemi.com           Atlanta, GA 30318
[EMAIL PROTECTED]             voice/fax: 404-892-5850

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to