Re: GtkList again! :(



On Monday 17 February 2003 15:41, Uni wrote:

Sorry to bother you people again! But for some reason my GtkList doesn't
have a scrollbar. I'm guessing that it should have one automatically after
what the API says about it...I've currently got:

list_shopping_list = gtk_list_new();
gtk_widget_ref (list_shopping_list);
(snip)
gtk_box_pack_start (GTK_BOX (hbox3), list_shopping_list, TRUE, TRUE, 0);

(snip)

you have to put it into a scrollwin, I believe:

GtkWidget *scrollwin, *clist;

scrollwin = gtk_scrolled_window_new (NULL,NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollwin),
                                                GTK_POLICY_AUTOMATIC,
                                                GTK_POLICY_AUTOMATIC);
clist = gtk_clist_new_with_titles ( ... bla ...);
gtk_container_add (GTK_CONTAINER(scrollwin), clist);
gtk_widget_show (clist);
gtk_widget_show (scrollwin);

or something like that.

Cheers
-Tim






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]