Re: GtkLayout continued - anyone out there?

From: Date: Thu, 28 Feb 2002 21:32:02 +0000
Subject: Re: GtkLayout continued - anyone out there?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1389@lists.php.net to get a copy of this message
Works for me...I'll try it under windows later today. Jared On Thu, 2002-02-28 at 11:41, Steph wrote: > 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(); > ?> > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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