- memclist = gtk_clist_new(18);
- gtk_clist_set_selection_mode(GTK_CLIST(memclist), GTK_SELECTION_SINGLE);
-
- for (i = 0; i < 18; i++) {
- gtk_clist_set_column_justification(
- GTK_CLIST(memclist), i, GTK_JUSTIFY_LEFT);
+ /* Creating a model */
+ store = gtk_list_store_new(N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
+
+ /* Creating the view component */
+ memlist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(memlist), TRUE);
+
+ gtk_container_add(GTK_CONTAINER(scrollwin), memlist);
+
+ g_object_unref(store);
+
+
+ /* Columns and cell renderers */
+ renderer = gtk_cell_renderer_text_new();
+
+ /* Add address column */
+ column = gtk_tree_view_column_new_with_attributes(
+ "Address", renderer, "text", COL_ADDRESS, NULL);
+ gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(memlist), column);
+
+ for (i = 1; i < 17; i++) {
+ column = gtk_tree_view_column_new_with_attributes(
+ "Val", renderer, "text", i, NULL);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(memlist), column);