Re: Documentation Request



On Mon, 2005-03-21 at 20:50 +0100, Murray Cumming wrote:
> On Mon, 2005-03-21 at 13:30 -0600, Bob Caryl wrote:
> > What I need to do is:  When a row is selected (and probably when the 
> > state of the check box is toggled) I need to determine the ancestor of 
> > the current row if it has one.  I then need to determine if any of its 
> > children's checkboxes are "activated" and then activate the ancestor's 
> > check box, proceeding recursively up the treestore until I hit the top 
> > level.
> 
> Gtk::TreeModel::iterator::parent() and
> Gtk::TreeModel::iterator::children() should let you navigate up and
> down.

Sorry, that's Gtk::TreeModel::Row, not iterator. You get a row by
dereferencing an iterator.

> > So, what I am struggling with now is deriving my own version of 
> > Gtk::TreeModel
> 
> Whoah there. It's extremely unlikely that you want to do that just to
> find out about some child rows. And you are not ready for such an
> advanced technique.
> 
> You seem very confused about the TreeView. You really should read the
> book chapter before guessing at stuff from the API:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08.html
> 
> 
-- 
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]