How do I display pixbufs instead of numbers for integer or boolean values in my treemodel?
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
- How can I change the regional settings of my system to display dates, times, currency values, and numbers in a different format?
- How do I display pixbufs instead of numbers for integer or boolean values in my treemodel?
- Can I display text values for a numeric indicator (to supress small numbers for example)?