Re: gtk tree store
- From: Jonathan Blandford <jrb redhat com>
- To: Burra <burra colorado edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk tree store
- Date: 14 Jan 2002 15:03:14 -0500
Burra <burra colorado edu> writes:
I am trying to create a table of data, but I cannot figure out how to
populate the store.
This is what I am doing...
/* Create a new store */
model = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
/* Create the view */
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
/* Try to create a new row */
try something like:
enum {
COLUMN_0,
COLUMN_1,
};
...
for (i = 0; i < 10; i++)
{
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
COLUMN_0, "string",
COLUMN_1, "string2",
-1);
}
etc.
Thanks,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]