On 02/19/2012 02:25 PM, Gary Kline wrote: > i've been looking for code to learn from. i spotted this botton > layout from the game 'Iagno' but could only find part of its source. > lucky for me that i know c++. be nice if there were some macro like > "GTK_BUTTONBOX_LEFT"!
GtkButtonBox is just a special type of layout widget that keeps the buttons all the same size. You can adjust it to put all the buttons to the right, left, center, or evenly across the dialog box. Or you can use a regular hbox, set the padding and margins the way you want, and use gtk_box_pack_start() to put them towards the left, and gtk_box_pack_end() to put them towards the right. And if set the HOMOGENEOUS property, they will all be the same size. I suggest you run glade-3 and just play with the layouts to get a feel for how you can use layouts to accomplish what you want. You can drag and drop the layouts, put layouts in layouts, and drop buttons and things in to see how they space out, etc. http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html, particularly part 7 that talks about packing and layout. You might even want to use glade to develop your GUIs and then use GtkBuilder to build them in your program without using code (it is easier once you figure out how it works). Building GUIs with code is still okay, but for large programs it's just too much of a pain! _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list