Re: CList
- From: Taura Milana <learfox furry ao net>
- To: gtk-app-devel-list gnome org
- Subject: Re: CList
- Date: Fri, 23 Nov 2001 02:04:33 -0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]