Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???
- From: Michael Gratton <mike vee net>
- To: Flavio Danesse <fdanesse gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???
- Date: Thu, 11 Aug 2016 12:21:13 +1000
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]