Re: TreeModel selected row number

2005-03-22 Thread Timothy M. Shead
On Tue, 2005-03-22 at 10:07 -0700, John Taber wrote: > On Tuesday 22 March 2005 09:35, Murray Cumming wrote: > > > It is actually very useful if the tree is being used as any sort of list > > > box. > > > > I don't understand. You have a list of colors, for example. You can find > > out what color

Re: TreeModel selected row number

2005-03-22 Thread Murray Cumming
On Tue, 2005-03-22 at 18:43 +0100, Murray Cumming wrote: > > currently I think this would have to be done: > > std::string color = row[menuColums.color] > > if (color == "blue") {...} > > //if I want to key to somethingelse have to find index of "blue" > > An id column will do the same, I think

Re: TreeModel selected row number

2005-03-22 Thread Murray Cumming
On Tue, 2005-03-22 at 10:07 -0700, John Taber wrote: > On Tuesday 22 March 2005 09:35, Murray Cumming wrote: > > > It is actually very useful if the tree is being used as any sort of list > > > box. > > > > I don't understand. You have a list of colors, for example. You can find > > out what color

Re: TreeModel selected row number

2005-03-22 Thread Murray Cumming
On Tue, 2005-03-22 at 08:11 -0700, John Taber wrote: > On Tuesday 22 March 2005 03:41, Murray Cumming wrote: > > Yes, I think it's that difficult. But the row number should not be > > useful anyway, because the TreeModel is iterator based. It's the same as > > wanting to get the numerical index of

Re: TreeModel selected row number

2005-03-22 Thread John Taber
On Tuesday 22 March 2005 09:35, Murray Cumming wrote: > > It is actually very useful if the tree is being used as any sort of list > > box. > > I don't understand. You have a list of colors, for example. You can find > out what color has been selected. Why do you need to know what > alphabetical so

Re: TreeModel selected row number

2005-03-22 Thread John Taber
On Tuesday 22 March 2005 03:41, Murray Cumming wrote: > Yes, I think it's that difficult. But the row number should not be > useful anyway, because the TreeModel is iterator based. It's the same as > wanting to get the numerical index of a std::list. It is actually very useful if the tree is being

Re: TreeModel selected row number

2005-03-22 Thread Murray Cumming
On Tue, 2005-03-22 at 03:30 -0700, John Taber wrote: > I cannot seem to figure out how to get the selected row number in a tree > model. I am following the example framework and have: > > Gtk::TreeModel::iterator iter = m_refTreeModel->get_iter(path); > if(iter) {Gtk::TreeModel::Row row = *iter;

TreeModel selected row number

2005-03-22 Thread John Taber
I cannot seem to figure out how to get the selected row number in a tree model. I am following the example framework and have: Gtk::TreeModel::iterator iter = m_refTreeModel->get_iter(path); if(iter) {Gtk::TreeModel::Row row = *iter;} this gives me the "Row" and I can get any member of that row