Quantcast

Images in CellRendererCombo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Images in CellRendererCombo

Andrew Rowland-2
Hi all.

I'm using PyGTK-2.24.0 and trying to put a "list" of images in a
CellRendererCombo with no luck so far.  I can find examples for putting
images in a ComboBox, but not the CellRendererCombo.  Looking at the API
docs, it doesn't look like there are attributes/methods for the
CellRendererCombo to allow what I want.  While I noodle over an
alternate solution, I wanted to see if the experts (of which, I'm not
one) know if it's possible.  If it is, I'd appreciate a nudge in the
right direction.

TIA

Andrew "weibullguy" Rowland

_______________________________________________
pygtk mailing list   [hidden email]
http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

weibullguy.vcf (133 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Images in CellRendererCombo

ilius
ComboBox is like a row of tree, supporting many columns with different
Cell Renderers including text and pixbuf.
But CellRendererCombo itself is not. It's only one Cell Renderer (a
Cell Renderer can not contain many Cell Renderers) and it's only text,
like ComboBoxText. As in docs of CellRendererCombo, there is only
"text-column", there is no "pixbuf-column".

So I guess it's not possible.
I suggest you add a CellRendererPixbuf *before* CellRendererCombo, and
set the image *after* users selects an option from combobox.
Or if you want to let user select an image file from many images, you
can catch 'button-press-event' of treeview, and open a gtk.Menu (with
images and image name) if the button-press location was in that
column.

On 1/30/16, Andrew Rowland <[hidden email]> wrote:

> Hi all.
>
> I'm using PyGTK-2.24.0 and trying to put a "list" of images in a
> CellRendererCombo with no luck so far.  I can find examples for putting
> images in a ComboBox, but not the CellRendererCombo.  Looking at the API
> docs, it doesn't look like there are attributes/methods for the
> CellRendererCombo to allow what I want.  While I noodle over an
> alternate solution, I wanted to see if the experts (of which, I'm not
> one) know if it's possible.  If it is, I'd appreciate a nudge in the
> right direction.
>
> TIA
>
> Andrew "weibullguy" Rowland
>
_______________________________________________
pygtk mailing list   [hidden email]
http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Loading...