Re: How to customize GtkCellRendererCombo ?



On Sat, 2015-12-05 at 16:47 +0100, Miroslav Rajcic wrote:
I am trying to customize GtkCellRendererCombo so that the items in the
combo box have different colors.

Yes, that is not really easy.

Looking at

https://developer.gnome.org/gtk3/stable/GtkCellLayout.html#gtk-cell-layo
ut-set-cell-data-func

I saw

"This function is used instead of the standard attributes mapping for
setting the column value, and should set the value of cell_layout ’s
cell renderer(s) as appropriate."

So my guess was to replace your 

//TOFIX

comment with this call:
                                gtk_cell_layout_pack_start(GTK_CELL_LAYO
UT(combo), renderer, TRUE);

Seems to work.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]