On Mon, Mar 19, 2018, 19:00 Bachsau <w...@bachsau.name> wrote: > > Now I want to expand my application to manage not just one but several > bunches of those data, each in a different tab inside the same window. > > First as you said that and then I thought you needed to know about GtkTreeModel widget
"The GtkTreeModel <https://developer.gnome.org/gtk3/stable/GtkTreeModel.html> interface defines a generic tree interface for use by the GtkTreeView <https://developer.gnome.org/gtk3/stable/GtkTreeView.html> widget. It is an abstract interface, and is designed to be usable with any appropriate data structure. The programmer just has to implement this interface on their own data type for it to be viewable by a GtkTreeView <https://developer.gnome.org/gtk3/stable/GtkTreeView.html> widget." for *bunches of those data, each in a different tab inside the same window.* On Mon, Mar 19, 2018 at 8:13 PM, Bachsau <w...@bachsau.name> wrote: > Am 19.03.2018 um 13:21 schrieb Lucky B.C: > >> don't keep only one GtkTreeModel for storing the data, I mean you should >> have multiple GtkTreeModels. >> > > You mean I should use more than one GtkTreeModel for a *single* set of > data? What would be the benefit of this and how does it help with my > problem? > > I already read through the documents. If I would have understood them > completely I might not be asking... > > Second what you just said was different before that *You mean I should use more than one GtkTreeModel for a *single* set of data?* On Mon, Mar 19, 2018 at 8:30 PM, Bachsau <w...@bachsau.name> wrote: > Am 19.03.18 um 13:17 schrieb '-': > >> Have you tried removing the existing TreeView widget from one Notebook >> tab, and adding it (the same instance) to another when the user switches? >> > > No, I didn't implement any Notebook yet. This was just to describe how it > should look like. What you propose is an ugly hack I'd rather avoid. If I > there is no use for any of the functionalyties of a Notebook, I won't use > it just to get it's look and if I would, probably the cleanest way would be > to not place anything on its pages at all, so only the tabs are visible and > keep the TreeView in an area beyond. > > Also, TreeView has a set_model() method which lets you specify which model >> to use. For example, unset the model before making numerous data changes >> and set it back afterwards, works faster without needless redraws. >> > > I will look into that. > Finally, yes it's the same what I wanted you find in the Gtk document at the first message from me to you. On Mon, Mar 19, 2018 at 11:39 AM, Lucky B.C <lblack...@gmail.com> wrote: > Hi, you're wrong about GtkTreeView did! Let's have more detail about what > a GtkTreeView <https://developer.gnome.org/gtk3/stable/GtkTreeView.html> > can do, here we go: > > 1) GtkTreeView can use more one GtkTreeModel > <https://developer.gnome.org/gtk3/stable/GtkTreeModel.html>. > > 2) GtkTreeModel is implemented by GtkListStore > <https://developer.gnome.org/gtk3/stable/GtkListStore.html>, > GtkTreeModelFilter > <https://developer.gnome.org/gtk3/stable/GtkTreeModelFilter.html>, > GtkTreeModelSort > <https://developer.gnome.org/gtk3/stable/GtkTreeModelSort.html> and > GtkTreeStore <https://developer.gnome.org/gtk3/stable/GtkTreeStore.html>. > > 3) GtkList ... GtkTreeStore are what you need in the case. > *GtkTreeView can use more one GtkTreeModel* as the gtk_tree_view_set_model function. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list