Experimenting with cell attributes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-05-30 21:02:33 +00:00
parent b086d55fe1
commit 2a5e6d1b3a
2 changed files with 29 additions and 13 deletions

View File

@@ -1650,18 +1650,28 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column,
cell->SetValue( value );
/*
To set the background to this
wxColour colour(30,100,255);
GdkColor *gcol = colour.GetColor();
wxListItemAttr attr;
list_store->model->GetAttr( attr, cell->GetOwner()->GetModelColumn(), model_row );
if (attr.HasBackgroundColour())
{
wxColour colour = attr.GetBackgroundColour();
GdkColor *gcol = colour.GetColor();
GValue gvalue = { 0, };
g_value_init( &gvalue, GDK_TYPE_COLOR );
g_value_set_boxed( &gvalue, gcol );
g_object_set_property( G_OBJECT(renderer), "cell-background_gdk", &gvalue );
g_value_unset( &gvalue );
*/
GValue gvalue = { 0, };
g_value_init( &gvalue, GDK_TYPE_COLOR );
g_value_set_boxed( &gvalue, gcol );
g_object_set_property( G_OBJECT(renderer), "cell-background_gdk", &gvalue );
g_value_unset( &gvalue );
}
else
{
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_BOOLEAN );
g_value_set_boolean( &gvalue, FALSE );
g_object_set_property( G_OBJECT(renderer), "cell-background-set", &gvalue );
g_value_unset( &gvalue );
}
}
IMPLEMENT_CLASS(wxDataViewColumn, wxDataViewColumnBase)