Thanks a lot, now it's ok, 0 warnings!
----- Original Message ----
From: John Finlay <[EMAIL PROTECTED]>
To: Andrea Caminiti <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Wednesday, April 23, 2008 1:27:23 PM
Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)
Andrea Caminiti wrote:
> ----- Original Message ----
> From: Andrea Caminiti <[EMAIL PROTECTED]>
> To: John Finlay <[EMAIL PROTECTED]>
> Sent: Wednesday, April 23, 2008 9:16:24 AM
> Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)
>
>
>
>
>> Andrea Caminiti wrote:
>>
>>> hi john:
>>>
>>> i was trying to use the code you just posted to to have a combobox with
>>> images and it's labels (text), only, no text entry needed. but i got some
>>> warnings.
>>>
>>> the code i used:
>>>
>>> def combo(self):
>>> #lists = self.list
>>> combobox = gtk.ComboBox()
>>> list = gtk.ListStore(gtk.gdk.Pixbuf, str)
>>> px = gtk.CellRendererPixbuf()
>>> text = gtk.CellRendererText()
>>> combobox.pack_start(px, True)
>>> combobox.pack_start(text, True)
>>> combobox.add_attribute(px, "pixbuf", 0)
>>> combobox.add_attribute(text, "text", 1)
>>> combobox.pack_end(text, True)
>>>
>>>
>> you seem to be adding this twice. I think that's what the error message
>>
> is about.
>
>
You are adding the cellrenderertext "text" to the combobox twice - once
in the pack_start and once in the pack_end. You can only add it once.
Remove the line containing pack_end.
John
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/