TreeModel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TreeModel

Deepak Chiradoni
Hello Everyone,

I am using GTKMM Glade tool for GUI developing. I want to insert more rows around 35 rows in treemodel. Is there any option for inserting rows using loops. I am adding 35 rows appending rows 35 times. The code becoming very large and difficult to manipulate in future. Is there any looping option for appending more rows? It has 6 columns. Please help me to make code optimized.

Regards
Deepak

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: TreeModel

Daniel Boles
It would certainly help if you show an excerpt of what kind of data you currently add, and how. Then we can figure out how to make that into something loopable.

Generally, though, I think the idea would be that you would define a struct containing the data you want to insert, then loop over a set of that (e.g. a vector or initializer_list) inserting into the model from the corresponding fields.


_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list