Packing help



Hi,

I'm new to GTK (and I'm moving from MSVC, so don't be hard on me), and I
have this question about packing.

I want to create something like this:

*****
*****
***** *****

Where every '*****' is a button. I understand how to pack boxes into
boxes, but all I managed to reach so far is this:

******
******
**  **

(The last two buttons shrinks into the size of one button).
Where am I going wrong? This is my code in short:

box1 = gtk_vbox_new(FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_box_pack_start(GTK_BOX(box1), button[1], TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(box1), button[2], TRUE, TRUE, 0);

box2 = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(box1), box2, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(box2), button[0], 0, 0, 0);
gtk_box_pack_start(GTK_BOX(box2), button[1], 0, 0, 0);


Any help would be appriciated.

	- Lior Chen <liorc@usa.net>



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