How do I stop the column headings of a GtkCList disappearing when the list is scrolled?

GTK+ FAQ
<<< Previous | Development with GTK+: widget specific questions | Next >>>

# How do I stop the column headings of a GtkCList disappearing when the list is scrolled?

This happens when a GtkCList is packed into a GtkScrolledWindow using the function `gtk_scroll_window_add_with_viewport()`. The prefered method of adding a CList to a scrolled window is to use the function `gtk_container_add`, as in:

        GtkWidget *scrolled, *clist;
        char *titles[] = { "Title1" , "Title2" };

        scrolled = gtk_scrolled_window_new(NULL, NULL);

        clist = gtk_clist_new_with_titles(2, titles);
        gtk_container_add(GTK_CONTAINER(scrolled), clist);

<<< Previous | Home | Next >>>
Development with GTK+: widget specific questions | Up | I don't want the user of my applications to enter text into a GtkCombo. Any idea?