c++ - Row Background Color GtkTreeView Widget -
i'm attempting color disabled rows in gtk tree view widget light gray color. i've read, i'm supposed set background-gdk property of corresponding cellrenderer , bind model column. sort of works.
gtk::cellrenderertext* textrenderer = manage(new gtk::cellrenderertext()); textrenderer->property_editable() = false; gtk::treeviewcolumn *col = manage(new gtk::treeviewcolumn("column1", *textrenderer)); col->add_attribute(*textrenderer, "background-gdk", m_treeview_columns.m_back_color); my_treeview.append_column(*col); gtk::treemodel::row row; (int = 0; < number_of_rows; ilane++){ row = *(treeview_liststore->append()); row[m_worklistcolumns.m_back_color] = gdk::color("#cccccc"); }
in end though, cells colored properly. ugly white-space in between cells. know of way fix or better way achieve effect i'm after?
could set background of row match cell background or set bakground of tree view ? or maybe cell cell-background-gdk ?
Comments
Post a Comment