GtkLayout continued - anyone out there?

From: Date: Thu, 28 Feb 2002 18:41:25 +0000
Subject: GtkLayout continued - anyone out there?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1388@lists.php.net to get a copy of this message
OK, the following script IMO should work, but doesn't on Windows. Could someone please say whether it works under 'nix, or maybe get the script working if that's the problem? <? dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" : "so")); $window = &new GtkWindow(); $window->set_position(GTK_WIN_POS_CENTER); $window->connect_object("destroy", array("gtk", "main_quit")); $window->set_usize(250, 250); $scrollwin = &new GtkScrolledWindow(); $window->add($scrollwin); $layout = &new GtkLayout(null, null); /* shouldn't need to do anything about adjustments as GtkLayout is a scroll-aware widget - it should just slot into a GtkScrolledWindow with no further ado. NB Clicking in the trough produces expected reaction for these sizings from both scrollbars .. just doesn't shift the view. */ $layout->set_size(450, 450); /* I'm getting some results from dimensions of 33500 up - but not before */ $button1 = &new GtkButton('Button 1'); $button2 = &new GtkButton('Button 2'); $button3 = &new GtkButton('Button 3'); $x = 0; $y = 200; $z = 400; $layout->put($button1, $x, $x); $layout->put($button2, $y, $y); $layout->put($button3, $z, $z); $scrollwin->add($layout); $layout->show_all(); $window->show_all(); gtk::main(); ?>

« previous php.gtk.general (#1388) next »