GtkList question
- From: "Faria, Sydney C" <sydney faria pw utc com>
- To: "Gtk app devel list (E-mail)" <gtk-app-devel-list gnome org>
- Subject: GtkList question
- Date: Tue, 6 Sep 2005 10:04:00 -0400
I have set the following code to form a list of text items called SPN:
enum { SPN_COLUMN, N_COLUMNS }
GtkListStore *listModel = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING);
GtkTreeIter *iter;
gtk_list_store_append(listModel, &iter, NULL);
gtk_list_store_set(listModel, &iter, SPN_COLUMN, "1st SPN", -1);
gtk_list_store_set(listModel, &iter, SPN_COLUMN, "2nd SPN", -1);
gtk_list_store_set(listModel, &iter, SPN_COLUMN, "3rd SPN", -1);
GtkWidget *list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(listModel));
GtkCellRendererText *renderer = gtk_cell_renderer_text_new();
GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes("SPN",
renderer, "text", SPN_COLUMN, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(list), column);
gtk_box_pack_start(GTK_BOX(vbox), list, FALSE, FALSE, 0);
which is from 2.0 API for Tree Widgets. Eric Harlow's book gives an example
that uses
gtk_widget_set_usize(list, 250, 250) which is now deprecated. What to I use
to set a minumum size for the displayed list since I
am going to be starting out with an empty list box and would like to set
some sort of minimum size to this widget even though it
is empty.
Sydney
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]