Re: Mapping of model attributes with unknown values to a corresponding widget display



On Mon, 2011-10-10 at 15:40 +0200, Markus Elfring wrote:
> > Obviously C++'s bool type can't represent 3 values. You would need
> > something else, I suppose.
> 
> I'm curious how the answer to a question like 'Is it possible for a TreeModel to
> tell a CellRendererToggle that it is in an "in between" (inconsistent) state?'
> would fit into the current gtkmm template class infrastructure.
> http://faq.pygtk.org/index.py?req=show&file=faq13.018.htp

You can connect model columns to cell renderer properties using
add_attribute like so:
http://developer.gnome.org/gtkmm-tutorial/unstable/sec-treeview.html.en#treeview-cellrenderer-details

So something like this should work:

viewcolumn->add_attribute(renderer->property_inconsistent(),
  m_columns.m_inconsistent);

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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