Re: CList Question...



Chris Elston <celston corky sapien net> writes:

I apoligize if this is a common or boring question...

I'm working with the GtkCList widget for several aspects of an application
that I am currently working on.  For the most part, it's working great but
I'm having a slight problem.  Most of my CLists are using a select mode of
single or browse and I'm trying to find a method of retrieving which ever
single row is currently selected.  There appears to be a way in the old,
depricated GtkList widget which is:

GList *currentlySelected = GTK_LIST(myList)->selected;

but there does not appear to be a method that I can find.  The GTK
Tutorial aludes to a method but never specifies and I'm having a hard time
finding it within the API reference, esspecially since the GtkCList struct
is not listed because the API claims that all the fields are private and
one should only use the methods given.  Has anyone run into this problem
before and if so, how did you solve it.  Am I supposed to be keeping track
of the which row(s) are selected through my own global variables?  Any
help would be greatly appreciated.

You are supposed to use GTK_CLIST (clist)->selection.  This is a linked
list of ints, referring to the rows that are selected.

-Jonathan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]