Re: Background row color for a Gtk::TreeView



On Thu, 2009-11-26 at 14:01 +0100, Glus Xof wrote: 
> Hello everyone,
> 
> I have another question that I hope that would be enough difficult and
> elevated that will motivate everyone (who knows it, of course...) to
> reply me...
> 
> I write a Gtk::TreeView with a bool type column. Like this,
> 
> Gtk::TreeView m_indlist;
> m_indlist.append_column_editable("Select", m_Columns.m_col_select);
> 
> That I would like is that the background row color remains in blue
> while the cell of the column "Select" is TRUE.

Maybe by setting a slot to render the column's cell by using
Gtk::TreeViewColumn::set_cell_data_func().  In the handler, set one of
the Gtk::CellRenderer::property_cell_background() properties to the
color you want based on the value of the cell.

-- 
José






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