On 03-01-18 13:49, Luís Marques wrote:
I have a TreeStore where I can store data a TreeView displays. But I would prefer to instead make the data I already have stored elsewhere available to the TreeView. It is my understanding that a TreeModel allows me to do that, but I'm confused about how a TreeModel is used in GtkD.
If you have, say,
auto a = ["hello", "world"]
, how can you use a TreeModel to display those two entries in a TreeView?
You would need to create an class that implements the TreeModelIF
interface.
Like this:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/DemoCustomList/CustomList.d