Re: Re: A Question
| From: | Steph | Date: | Wed, 24 Jul 2002 01:55:55 +0000 |
| Subject: | Re: Re: A Question | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2285@lists.php.net to get a copy of this message | ||
short and sweet (assuming you're selecting single rows):
<?
function clicked_on($clist) {
$selected = $clist->selection[0];
echo $selected."\n";
}
$window = &new GtkWindow();
$window->connect_object('destroy', array('gtk', 'main_quit'));
$titles = array('column 1', 'column 2');
$clist = &new GtkCList(2, $titles);
for ($i = 0; $i < 9; $i++) {
$row = array("row $i col 1", "row $i col 2");
$clist->append($row);
}
$clist->connect('select_row', 'clicked_on');
$window->add($clist);
$window->show_all();
gtk::main();
?>
look at the docs on GtkList selection if you're intending anything more
complicated.
----- Original Message -----
From: "Ernesto Quiñones Azcárate" <ernesto@eqsoft.net>
To: <php-gtk-general@lists.php.net>
Sent: Wednesday, July 24, 2002 12:21 AM
Subject: [PHP-GTK] Re: A Question
Hello Friends
my name is Ernesto and I am a new user of PHP+GTK
this is my first time with gtk and i have any problems with the class
GtkCList somebody can write, wath function return the row number when i
select a row
tanks
si hay alguien por ahi que escriba en español podriamos armar una lista
en
castellano
--
***************************************************************
EQ Soft Consultoría y Soporte Informático
Ernesto C. Quiñones Azcárate
Gerente General
E-mail: ernesto@eqsoft.net
Teléfono : 724-4926
http://www.eqsoft.cjb.net
***************************************************************
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php