Re: Questions on Combo inside TreeView
- From: Murray Cumming <murrayc murrayc com>
- To: Leandro Fanzone <leandro hasar com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Questions on Combo inside TreeView
- Date: Mon, 14 Mar 2005 22:49:32 +0100
On Mon, 2005-03-14 at 18:40 -0300, Leandro Fanzone wrote:
>
> Murray Cumming wrote:
> > On Mon, 2005-03-14 at 18:13 -0300, Leandro Fanzone wrote:
> >
> > > Hello. I'm using Gtk::CellRendererCombo to provide a combobox inside a
> > > TreeView. I have two questions:
> > >
> > > 1) The Combo is built from a TreeModel. The field selected with
> > > property_text_column() is the one to be shown in the combo. How to
> > > access the other columns for the selected item in the TreeModel? I mean,
> > > if one item is selected, how to access the values entered in the other
> > > fields for that item, without having to go through all the children
> > > comparing strings?
> > >
> >
> > If you have the TreeModel::iterator then you can use TreeModel::Row[]
> > just as you would for a TreeView.
> >
>
> That's clear; te question is, how to get that iterator? The path you
> get with on_edited deals with the main tree, not with the internal
> tree used to build the combo. Where's the iterator that points to the
> selection?
Oh, I see. I don't think there is any way to access the row in the
CellRendererCombo's model from which the CellRendererCombo got the
chosen text value.
I guess you will need to keep your own mapping.
You might submit a gtk+ bug if this is a big problem for you.
--
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]