RE: [PHP-GTK] Child Packing
| From: | Nghia | Date: | Thu, 06 Jan 2005 05:32:16 +0000 |
| Subject: | RE: [PHP-GTK] Child Packing | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5404@lists.php.net to get a copy of this message | ||
Try this code
$window = &new GtkWindow();
$table = &new GtkTable(3, 1); // 3 rows, 1 col
$button = &new GtkButton("Audio CD");
// $button->set_size(100, 30);
$table->attach($button, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 10, 10);
$button = &new GtkButton("Data CD");
$table->attach($button, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 10, 10);
$button = &new GtkButton("Enhanced CD");
$table->attach($button, 0, 1, 2, 3, GTK_SHRINK, GTK_SHRINK, 10, 10);
$window->add($table);
$window->show_all();
gtk::main();
It uses table, which has a bit more control. You can use button->usize(x, y)
and it should do what you want.