ListBox with list models
- Dominant language
- No language data
- Stars
- 88
- Forks
- 30
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 1
Description
### Problem
Frequently requested in Discord lately is how to work with Gtk.ListBox
### Proposal
We should have a section that shows:
- [ ] How to create a Gtk.ListBox bound to a ListModel with a CreateWidgetFunc
- [ ] Granite style classes for lists like RICH_LIST and BOXED_LIST
- [ ] How to sort and filter a list model
- [ ] How to use placeholders
- [ ] How to use header functions
I would probably do it in this order:
1. Create a list of items and style it with rich_list and boxed_list
2. Change the model to use a sort func
3. Add a header func
4. Add a search entry and connect it to a filter func. Maybe also use https://valadoc.org/gtk4/Gtk.SearchEntry.set_key_capture_widget.html while we’re here
5. Add a placeholder for when there’s no search results
### Prior Art (Optional)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.