Relative Content

Tag Archive for gogtk3

GTK3 Saving uncompleted edits in a treeview when a button is clicked

I have a gtk3 window with a grid and some widgets for editing data. Some of the data is presented in a treeview.
If the user makes changes to a field in the treeview then clicks on a save button the uncompleted edit is cancelled rather than saved. (If they click on another field the data is saved and I can later write it back to the liststore).
How can I save the data when my save button is clicked?

gotk3 – using TreeModelForeachFunc

Are there any examples in Go of how to use gtk.TreeModelForeachFunc to iterate over a ListStore?
I cannot seem to get the syntax right – there are exmples in c, Python, Rust, but nothing in Go!
I cannot get past compile errors.