gtk_notebook and gtk_list
- From: "Shawn T. Amundson" <amundson CompleteIS com>
- To: gtk-list redhat com
- Subject: gtk_notebook and gtk_list
- Date: Wed, 23 Jul 1997 14:26:41 -0500 (CDT)
Has anyone else tried to put a gtk_list into a gtk_notebook? It
seems once the gtk_list is displayed, it doesn't go away even when
you select a page it shouldn't be in. Below is my simplest test
case.
-Shawn
#include <gtk/gtk.h>
void destroy (void);
void
main (int argc, char **argv)
{
GtkWidget *window;
GtkWidget *notebook;
GtkWidget *child;
GtkWidget *tab_label;
GtkWidget *index_container;
GtkWidget *index_listbox;
GtkWidget *index_tablabel;
gtk_init (&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy), NULL);
notebook = gtk_notebook_new();
gtk_container_add(GTK_CONTAINER (window), notebook);
child = gtk_label_new("child a");
tab_label = gtk_label_new("TAB A");
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),child,tab_label);
gtk_widget_show(tab_label);
gtk_widget_show(child);
index_tablabel = gtk_label_new("Listbox");
index_listbox = gtk_list_new();
gtk_list_set_selection_mode(GTK_LIST(index_listbox), GTK_SELECTION_BROWSE);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),index_listbox,index_tablabel);
gtk_widget_show(index_listbox);
gtk_widget_show(notebook);
gtk_widget_show(window);
gtk_main();
}
void
destroy (void)
{
gtk_exit(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]