Re: access widget in glade file from script

From: Date: Tue, 19 Nov 2002 16:45:22 +0000
Subject: Re: access widget in glade file from script
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2678@lists.php.net to get a copy of this message
try this: <?php function on_but1_clicked( $button ){ global $myApp; $myEntry = $myApp->get_widget("Entryfieldname"); $myEntry->set_text("text"); } function on_but2_clicked( $button ){ global $myApp; $myEntry = $myApp->get_widget("Entryfieldname"); $myEntry->set_text(""); } $myApp = GladeXML("yourgladefile.glade"); $myApp->signal_autoconnect(); Gtk::main(); } ?> Hope it helps... needed more than one week to fix this for my own needs. best regards Marian Feiler -- Internetservice & Marketing Agentur isurfin.net marian feiler Altenessenerstr. 99 45326 Essen Germany Telefon: +49 (0) 201 2798671 Telefax: +49 (0) 201 2946267 Hotline: 0180 5004195 E-Mail: mf@isurfin.net Internet: http://isurfin.net "Alexander Kuznetsov" <sanych@cstrade.koenig.ru> schrieb im Newsbeitrag news:16996187740.20021119160140@cstrade.koenig.ru... > Hello, > > I have a .glade file which contains one GtkEntry (named Entry) > and two Buttons. I have two functions for my buttons. > > Problem: > > how can I use > > $Entry->set_text("text"); > > method from my functions for buttons? > > When I clicked one button I want to see text "But1" in my GtkEntry > and for the second button I want text changed to "But2". > > How can I do this? > > -- > Best regards, > Alexander Kuznetsov > >

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