Please visit our sponsor
UNKNOWN
//**************************************
// Name: PHP-GTK Window Code
// Description:Simple explanation of PHP-GTK framework...!
// By: Bogomil Shopov
//
//
// Inputs:None
//
// Returns:None
//
//Assumes:None
//
//Side Effects:None
//This code is copyrighted and has limited warranties.
//Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.462/lngWId.8/qx/vb/scripts/ShowCode.htm
//for details.
//**************************************
set_title("Messenger");
//button
$bt=&new; GtkButton("Send value");
$bt2=&new; GtkButton("Kill Me!");
//layout
$adj=&new; GtkAdjustment(0,0,400,400,400,400);
$lt=&new; GtkLayout($adj,$adj);
// TextField
global $fld;
$fld= &new; GtkEntry();
//functions
function get_value($bt,$window){
global $fld;
$str=$fld->get_text();
echo"Your input:$str";
}
//element properties
$bt->connect("clicked","get_value", $window);
$bt2->connect_object('clicked', array('gtk', 'main_quit'));
//Layout positon
$lt->put($fld,1,1);
$lt->put($bt,50,50);
$lt->put($bt2,50,100);
//window show
$window->add($lt);
$window->show_all();
Gtk::Main();
?>