gtkCombo and GtkItemList

From: Date: Wed, 09 Oct 2002 22:26:47 +0000
Subject: gtkCombo and GtkItemList
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2521@lists.php.net to get a copy of this message
Hi, I'm trying this: $this->gui['Gtk_Combo'] = new GtkCombo(); $entry = $this->gui['Gtk_Combo']->entry; $entry->set_text('Selecciona algun proyecto'); $list = $this->gui['Gtk_Combo']->list; $list->set_selection_mode(GTK_SELECTION_SINGLE); $archivo = file("configuracion.inc");
$total    = count($archivo);
for($i = 0; $i < $total; $i++) {
    $var = split("\|",$archivo[$i]);
    $this->gui['item'] = &new GtkListItem();
    $this->gui['box'] = &new GtkHBox();
    $this->gui['label'] = &new GtkLabel(($var[0]));
    $this->gui['box']->pack_start($this->gui['label'], FALSE, FALSE);
    $this->gui['item']->add($this->gui['box']);
    $this->gui['Gtk_Combo']->set_item_string($this->gui['item'], $var[0]);
    $data = $var[1];
    $this->gui['item']->set_data($i, $data);
    $this->gui['item']->connect('button-press-event', array(&$this,'on_click'),$i);
    $list->add($this->gui['item']);
    $this->gui['item']->show_all();
} $this->gui['Gtk_Combo']->show(); I want to appear the content of $var[1]; but only return de last line of the file configuracion.inc, the content of this file is: EPPLESTUN|//usr/local/apache/htdocs/epplestun // jeje|//usr/local/apache/htdocs/dikode/jaja // sdaasf|//usr/local/apache/htdocs/dikode/asdad // Help me pls.

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