The general steps involved in working with a widget are:

<?php $ok =& new GtkButton('OK'); ?>
<?php $ok->connect('clicked''on_ok_clicked'); ?>
<?php $ok->set_border_width(3); ?>
<?php $top_window->add($ok); ?>
<?php $ok->show(); ?>