There are also functions available that let us force the (un)selection of a row. These are
void gtk_clist_select_row( GtkCList *clist, gint row, gint column ); void gtk_clist_unselect_row( GtkCList *clist, gint row, gint column ); |
And also a function that will take x and y coordinates (for example, read from the mousepointer), and map that onto the list, returning the corresponding row and column.
gint gtk_clist_get_selection_info( GtkCList *clist, gint x, gint y, gint *row, gint *column ); |
When we detect something of interest (it might be movement of the pointer, a click somewhere in the list) we can read the pointer coordinates and find out where in the list the pointer is. Cumbersome? Luckily, there is a simpler way...