Re: CList
- From: Martijn Bos <bos kamp wxs nl>
- To: learfox furry ao net
- Cc: gtk-app-devel-list gnome org
- Subject: Re: CList
- Date: Fri, 23 Nov 2001 12:19:32 +0100
Taura,
tnx. Just what I needed.
With your information I can do the trick.
Together with the headerfiles it's even more clear.
(Next time I will look in the header files first :))
Best Regards,
Martijn
Taura Milana wrote:
On 2001.11.23 00:56 Martijn Bos wrote:
Hi all,
On a window, I have a Clist and a button. Whenever a user clicks the
button, the selected row in the clist must be "processed".
I can't figure out how to determine wich row is selected
Any help would be apriciated
Okay you want to look at the GtkCList's member selection (or
selection_end). Handle it using the following code:
GtkCList *clist = myclist;
GList *glist;
gint row;
glist = clist->selection;
while(glist != NULL)
{
row = (gint)glist->data; /* Get row number as data pointer.
*/
/* Handle selected row here. */
/* Go on to next selected row. */
glist = glist->next;
}
Now note the above will only work for GtkCList's but not GtkCTree's
casted to GtkCLists. I don't want to give you too much to worry about
now, but if you do decide to get into ctree's write back.
For now I hope the above helps. :)
Sincerely,
--Taura Milana
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]