ListBox.setSortFunc

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 [method@Gtk.ListBoxRow.changed]) and when [method@Gtk.ListBox.invalidate_sort] is called.

Note that using a sort function is incompatible with using a model (see [method@Gtk.ListBox.bind_model]).

class ListBox
void
setSortFunc

Parameters

sortFunc GtkListBoxSortFunc

the sort function

userData void*

user data passed to @sort_func

destroy GDestroyNotify

destroy notifier for @user_data

Meta