Simple question



I'm try to program with gtk, create main window, vbox for buttons, but
then program run - button have all the window width.

How can i set button width and height?

This is code:

     gtk_init (&argc,&argv);
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW (window), "Panel Client");
        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);
        g_signal_connect(window, "delete-event",
G_CALLBACK(gtk_main_quit), NULL);


        vbox_main = gtk_vbox_new (FALSE, 0);
        gtk_container_add (GTK_CONTAINER (window), vbox_main);

        vbox_left = gtk_vbox_new(false,0);
        gtk_box_pack_start(GTK_BOX (vbox_main),vbox_left,false,false,0);


        //GenerateCategories(vbox_right);

        vbox_right = gtk_vbox_new(false,0);
        gtk_box_pack_start(GTK_BOX
(vbox_main),vbox_right,false,false,0);

        GenerateCategories(vbox_right);

        gtk_widget_show_all (window);
        gtk_main ();
}

screenshot: http://packages.selfip.ru/screenshot.png



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