Re: Accessing a Cell in a TreeView
- From: Emil Nowak <emiml wp pl>
- To: gtkmm-list gnome org
- Subject: Re: Accessing a Cell in a TreeView
- Date: Sat, 6 Jan 2007 03:01:14 +0100
On 2007-01-05, 15:59:04 Allen wrote:
> Hi all,
>
> would someone mind telling me how to access a specific cell in a
> TreeView? I am actually trying to change the background color in a Cell
> w/in a TreeView that has already been setup with rows and columns.
>
> I can access the value w/in the Cell but I do not know how to change the
> cell's background color.
Probably the only way to have different cells is to redesign your TreeModel
(probably ListStore). You will need additional column to hold color values.
Then when adding column to TreeView you can specifying where renderer
will get its data.
Something similar as described in Tutorial
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s02.html
in paragraph "Specifying CellRenderer details"
for Your purposes You will need sth. like that:
col->add_attribute(pRenderer->property_cell_background(), m_columns.color);
col->add_attribute(pRenderer->property_text(), m_columns.text);
The other solution is to use pango markup for this columns, and then modify
directly cell data.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]