Re: How to access list within a GTK::TreeView ? [SOLVED]
- From: Dave Bartmess <dingodave edingo net>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: How to access list within a GTK::TreeView ? [SOLVED]
- Date: Sun, 15 Jun 2008 11:16:11 -0600
On Saturday 14 June 2008 10:31:51 pm Dave Bartmess wrote:
> I'm using a Gtk::ListStore for the model of a Gtk::TreeView, and want to
> get an iterator or list of the contents of the rows. I don't see any way to
> get an iterator OR the contents of the TreeView for use after the editing
> is done.
>
> How do I do that? I see get_iter(Path &), but I'm not sure what path to
> use...
>
> Kinda new to GTKMM, so please be kind...
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);
}
--
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]