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.

php-gtk-0.5.2a-win32.zip

Code:
 
<?php
/* $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')
		dl('php_gtk.dll');
	else
		dl('php_gtk.so');
}


function delete_event()
{
	return false;
}



function destroy()
{
	Gtk::main_quit();
}



function buttons()
{
	global	$window;
	print 'Closing window\n';
	$window->destroy();
}



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




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




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




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

$window->show_all();




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



Gtk::main();


?>

 
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.