set_filter_func


Description:

[ Version ( since = "3.10" ) ]
public void set_filter_func (owned ListBoxFilterFunc? filter_func)

By setting a filter function on the this one can decide dynamically which of the rows to show.

For instance, to implement a search function on a list that filters the original list to only show the matching rows.

The filter_func will be called for each row after the call, and it will continue to be called each time a row changes (via changed) or when invalidate_filter is called.

Note that using a filter function is incompatible with using a model (see bind_model).

Parameters:

this

a ListBox

filter_func

callback that lets you filter which rows to show

destroy

destroy notifier for user_data

user_data

user data passed to filter_func