Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???




Hi Flavio,

On Thu, Aug 11, 2016 at 11:34 AM, Flavio Danesse <fdanesse gmail com> wrote:
Hello, to see if anyone knows how to do this ? I try pass this code python
to Vala:

self.get_model (). append ( _iter , [int (key) , text, color] )


The idea is that adding a new element in a treeview , you can specify a
particular color in that cellrender I tried a little of everything and
nothing seems to work

In Vala, you get the newly appended row out first and then set values on it, e.g.:

> Gtk.ListStore model = ...
> Gtk.TreeIter iter;
> model.append(out iter);
> model.set(iter, int(key), text, color);

HTH,
//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>




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