Retrieving Column Data from a ListStore?
Ron Tarrant
rontarrant at gmail.com
Wed Apr 24 18:56:50 UTC 2019
On Wednesday, 24 April 2019 at 15:13:29 UTC, Mike Wey wrote:
> The ListStore/TreeModel provides functions to retrieve the
> data, `gtk.TreeModelIF.TreeModelIF.getValue`.
>
> A TreeIter indicates the row these kind of function apply to.
Well, this is embarrassing. I tried that earlier and it didn't
work. Now it does. Go figure. (sigh)
Thanks, Mike.
For anyone else who comes along looking for the same answer,
here's what I did:
```
void onChanged(ComboBox cb)
{
TreeIter treeIter;
TreeModelIF treeModel;
string data;
writeln("active: ", getActive());
getActiveIter(treeIter);
data = getModel().getValueString(treeIter, 1);
writeln(data);
} // onChanged()
```
More information about the Digitalmars-d-learn
mailing list