Re: Changing color of individual cells in a table



On Fri, 2005-07-01 at 15:47 -0500, Nickolai Dobrynin wrote:
> OK, let me simplify and rephrase my question.  Say I would like to have a
> 2x2 table with each cell colored differently and containing a short string
> of text.  Anybody could explain how to achieve this behavior?
> 
> What would be the appropriate ModelColumns class to use and what would be
> the appropriate TreeModel/TreeView structure?
> 
> I think, I don't really get the conceptual side of this.  Things should
> become much simpler once I do.  I hope someone will help me with this, as I
> don't have anybody else to ask.

Either put the colors in the model and bind them to cell renderer
properites in the view:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s02.html#id2519539

Or use the set_cell_data_func() callback to choose the color
dynamically.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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