My GtkCList rows represent instances, but how can I keep track of them?
Often you have a CList where you represent instances, but since the CList itself is only an array of text cells, you might think that you need to do your own bookkeeping of them (having a mapping row -> instance, for example.) But GTK+ already does that for us: Each row in a CList can have a data object attached to it by using the set_row_data() method. This method takes an object reference and attaches it to a row.
• 24.2. Why doesn’t GtkCList’s children() method return the lists rows? • 24.3. How do I access data that is in a GtkCList? • 24.4. How do I order the contents of a GtkCList according to the type of data in the columns (or, where is gtk_clist_set_compare_func)? • 24.5. How do I get the data out of a GtkCTree? • 24.6. How would I recurse through all nodes in a GtkCTree? • 24.7. How do I capture a right-click or double-click event on a GtkCList row? • 24.8. How do I find a row in a GtkCList that contains “X”? • 24.9. When entering data dynamically into my GtkCList or tree, it flickers like mad! • 24.10. How do I align a GtkCList’s columns? • 24.11. How do I remove a row from a CList? • 24.12. How do I find out which row(s) are selected in the GtkCList? • 24.13. How do I colour the background of a GtkCList row? • 24.14. How do I find out what the current selection mode in the GtkCList is? • 24.15. How do I change the style of the white space between CList rows?