Re: [gtk-list] Clist get row data



>From: "Buch, William H." <bbuch@hqm.com>

>Could someone please explain to me how to breakdown the gpointer
>returned by the function gtk_clist_get_row_data.  I have four
>columns,the first one blank, second and third are pixmaps, and the
>last one is of type gchar *.

I guess you are also confusing the two different issues that I did 
initially. There is no connection between the data in the 'displayed 
row' and the data associated with a row. The displayed data is set by 
using the funcs gtk_clist_set_text(), gtk_clist_set_pixmap(), 
gtk_clist_set_pixtext() or gtk_clist_append(). The other data which the 
document says as an 'arbitrary data pointer' is the one that is NEVER 
displayed. It is set using the func gtk_clist_set_row_data(). It comes 
in handy for the programmer to associate (lets say) a pointer to a 
struct or an object, to a row and then later in the program do something 
with it based upon selection or other circumstances.

The bottom line is that if you have not set it initially using 
gtk_clist_set_row_data(), you are likely to see garbage. If you want the 
'displayed data' from a row use gtk_clist_get_text(), 
gtk_clist_get_pixmap() or gtk_clist_get_pixtext() instead. 

( Yup! its a pain getting the data out cell-by-cell... )

I hope I have not missed anything
-kaq

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



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