<?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();
?>
|