simple question about gtk_notebook



Hello. 

I have this code (window with 2 tabs), if i'm try to run - displays only
window without tabs, where is error ?

      gtk_init (&argc, &argv);
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW (window), "Services");
        gtk_window_set_position (GTK_WINDOW (window),
GTK_WIN_POS_CENTER);
        gtk_container_set_border_width (GTK_CONTAINER (window), 1);
        gtk_widget_set_size_request (window, 640, 480);
        gtk_window_set_default (GTK_WINDOW (window), NULL);
        g_signal_connect (window, "destroy", G_CALLBACK (signal_quit),
NULL);
        g_signal_connect (window, "key_press_event", G_CALLBACK
(signal_keypress), NULL);

        notebook = gtk_notebook_new ();
        gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);


        startup_label = gtk_label_new ("Startup Programs");
        running_label = gtk_label_new ("Running Programs");

        startup = gtk_frame_new (NULL);
        running = gtk_frame_new (NULL);

        gtk_notebook_append_page (GTK_NOTEBOOK (notebook), startup,
startup_label);
        gtk_notebook_append_page (GTK_NOTEBOOK (notebook), running,
running_label);
      gtk_widget_show (notebook);
        gtk_widget_show (startup);
        gtk_widget_show (running);

        gtk_widget_show (running_label);
        gtk_widget_show (running_label);
     gtk_widget_show (window);
        gtk_main ();




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