Okay so I am starting on this. This is my first thing. I modified the sample hello.php code that came with the zip file.


/* $Id: hello.php,v 1.6 2002/11/25 18:22:05 fmk Exp $ */

if (!class_exists('gtk')) {
	if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')

function delete_event()
	return false;

function destroy()

function buttons()
	global	$window;
	print 'Closing window\n';

$window = &new GtkWindow();
$window->connect('destroy', 'destroy');
$window->connect('delete-event', 'delete_event');

$button = &new GtkButton('Close');
$button->connect('clicked', 'buttons');

$tt = &new GtkTooltips();
$tt->set_tip($button, 'Closes out this Window', '');

/*realize the underlying GdkWindow, flag the GtkWindow's visibility and map
  it onto the screen, all in one simple line*/


/*without the main loop, there is no PHP-GTK script*/



I can get it up and running and it dose what I want it to but I have trouble adding widgets to it. The whole adding a child widget to the parrent is screwing me up or maybe my syntax is fucked. Can anyone breake this down for me in forest gump terms? I know a widget is basicaly equal to an object in other languages. I am talking the child parent relationship

Why some widgets can only have one child and others unlimited.