Re: How to access list within a GTK::TreeView ? [SOLVED]



On Sunday 15 June 2008 11:49:53 am Murray Cumming wrote:
> On Sun, 2008-06-15 at 11:16 -0600, Dave Bartmess wrote:
> > On Saturday 14 June 2008 10:31:51 pm Dave Bartmess wrote:
> > > <SNIP>
> > > > > I finally figured it out... As the code below shows, I need to get 
the 
> > children (NOT a very understandable name... btw). Hope this helps someone
> > else avoid this problem....
> >
> > void MainWindow::on_button_save() {
> >     cout << "Button Save" << endl;
> >     Gtk::TreeModel::iterator iter = refListStore->children().begin();
> >     for (; iter != refListStore->children().end(); ++iter) {
> >         cout << (*iter)[m_Columns.m_title] << endl;
> >     }
> >     setChanged(false);
> > }
>
> We do have a whole chapter about the TreeView that covers this basic
> stuff, by the way. For instance:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-iterating-over-m
>odel-rows.html

I read that chapter but didn't see anything about how to get the info back out 
of the refListStore.... Thanks!

-- 
Dave Bartmess
http://edingo.net
____________________________________
Member of the Internation Internet Leathercrafters Guild (http://iilg.org)
Member of the Columbine Leather Guild (http://edingo.net/columbine)
____________________________________
It used to be said that an infinite number of monkeys, 
given typewriters, would eventually reproduce the complete 
works of Shakespeare. Now, thanks to the internet, 
we know this is not in fact the case.


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