ListBox.setSortFunc

void setSortFunc(gtk.types.ListBoxSortFunc sortFunc = null)

Sets a sort function.

By setting a sort function on the box one can dynamically reorder the rows of the list, based on the contents of the rows.

The sort_func will be called for each row after the call, and will continue to be called each time a row changes (via gtk.list_box_row.ListBoxRow.changed) and when gtk.list_box.ListBox.invalidateSort is called.

Note that using a sort function is incompatible with using a model (see gtk.list_box.ListBox.bindModel).

Parameters

sortFuncthe sort function