Re: Changing color of individual cells in a table



Murray and Vladislav,

Thanks very much to both of you.  I got it to work.  The fun part is that I
was looking at the relevant code online over and over without realizing that
this was exactly what I need, until I saw this technique used by Vladislav
in his code.


Best,

Nickolai



On Mon, Jul 04, 2005 at 12:32:27PM +0200, Murray Cumming wrote:
> 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]