Creates a new vertical box container designed for packing a single column of child widgets.
The first parameter, homogeneous, is a boolean value which, if set to true, will set each child widget in the GtkVBox to the same height as that of the largest child widget. The second parameter, spacing, sets the minimum spacing between the child widgets, in pixels. Leaving both parameters empty, e.g.
will set the default behaviour of individual sizing and zero spacing.
Ejemplo 55. Packing child widgets using GtkVBox and GtkHBox
<?php $window = &new GtkWindow(); $window->set_title("GtkHBox and GtkVBox packing demonstration"); $window->set_position(GTK_WIN_POS_CENTER); $window->connect_object("destroy", array("gtk", "main_quit")); $window->show(); $vbox = &new GtkVBox(false, 5); $window->add($vbox); $label = &new GtkLabel(); $label->set_text("This GtkLabel is packed at the start of a GtkVBox. The GtkCalendar below is\npacked at the start of a GtkHBox, which is in turn packed at the end of the\nGtkVBox. The empty GtkText widget is packed at the end of the GtkHBox."); $label->set_justify(GTK_JUSTIFY_LEFT); $vbox->pack_start($label, true, true, 5); $label->show(); $hbox = &new GtkHBox(true, 0); $vbox->pack_end($hbox); $calendar = &new GtkCalendar(); $hbox->pack_start($calendar, true, true, 2); $calendar->show(); $text = &new GtkText(); $text->set_editable(true); $hbox->pack_end($text, true, true, 2); $text->show(); $window->show_all(); gtk::main(); ?> |