Andre Colomb sent me a very interesting and useful sample code.
Quoted from his email:
“I’ve been trying to mess around with GtkCellRendererCombo some more. In my application, there are several combo boxes to select a value between 1 and 10. For the user to see which is good and which is bad, I set the background color for each cell in the combo box accordingly–which works perfectly. I added another column in the combo model holding the
color and change the background using a callback set with GtkCellLayout::set_cell_data_func().”
His sample code produces this:
Cool, isn’t it?
Here are the sample codes contributed by Andre Colomb:
The place for php-gtk2 sample codes