Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I display pixbufs instead of numbers for integer or boolean values in my treemodel?

0
10 Posted

How do I display pixbufs instead of numbers for integer or boolean values in my treemodel?

0
10

This is an example of changing the data type or format of a treemodel column before displaying it. The general technique for these problems is to use a cell data function to modify the value before setting the appropriate cell renderer property to display it. The same idea will work to control the formatting of a text cell, for example to format a number before displaying it. The cell data function is straightforward. We set the ‘pixbuf’ cell property to the pixbuf to display or None for a blank column.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.