Re: GtkEntry

From: Date: Thu, 20 Dec 2001 22:06:34 +0000
Subject: Re: GtkEntry
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-886@lists.php.net to get a copy of this message
Please always keep such things at the list so they get archived and aid other users in seeking help for PHP-GTk problems. On Thu, Dec 20, 2001 at 03:53:54PM -0600, Anson Rinesmith wrote : > This is what I think is the relevant code from what I am trying to do. > I am probably butchering what could be beautiful code, so I accept > any comments/remarks/help. > > function fill_entry($fw_data_box){ > $fw_data_box->set_text("NEW"); > } If you want to get the your databox being passed to fill_entry() you will have to explicetely do so (see below). > > ..... > function show_rules(){ > global $rules_window; > $box1 = &new GtkVBox(); > $rules_window->add($box1); > $frame1 = &new GtkFrame('CURRENT WINDOW'); > $box1->pack_start($frame1,false); > $label = &new GtkLabel('FIREWALL RULES'); > $frame1->add($label); > $frame2 = &new GtkFrame('Current Rules'); > $box1->pack_start($frame2,true); > $scrolled_win = &new GtkScrolledWindow(); > $scrolled_win->set_border_width(5); > $scrolled_win->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); > $frame2->add($scrolled_win); > $frame3 = &new GtkFrame(); > $box1->pack_start($frame3,false); > $fw_data_box = &new GtkEntry(); > > $frame3->add($fw_data_box); > $fw_data_box->set_text("TEST"); > > $frame4 = &new GtkFrame('Options'); > $box1->pack_start($frame4,false); > $delete_button = &new GtkButton('DELETE'); > $frame4->add($delete_button); > $frame5 = &new GtkFrame(); > $box1->pack_start($frame5,false); > $add_button = &new GtkButton('ADD'); > $frame5->add($add_button); > > ... > > $clist->connect('select-row','fill_entry'); $clist->connect_object('select-row', 'fill_entry', &$fw_data_box); -- Please always Cc to me when replying to me on the lists.

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