Fw: [PHP-GTK] Re: A Question
| From: | Steph | Date: | Wed, 24 Jul 2002 02:07:17 +0000 |
| Subject: | Fw: [PHP-GTK] Re: A Question | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-2286@lists.php.net to get a copy of this message | ||
erm, oops, I just looked at the signal prototype ..
Sorry Ernesto, it's not even that complicated. You could use the same
connect() call to the function
function clicked_on($clist, $row, $col, $event) {
echo $row."\n";
}
and get the same result. The select-row signal carries all this
information with it ..
----- Original Message -----
From: "Steph" <sfox@php.net>
To: "Ernesto Quiñones Azcárate" <ernesto@eqsoft.net>;
<php-gtk-general@lists.php.net>
Sent: Wednesday, July 24, 2002 1:55 AM
Subject: Re: [PHP-GTK] Re: A Question
> 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
>
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>