iced
iced copied to clipboard
[Question] Selectable Item List
Hi, I'm trying to find a widget similar to Qt's QListWidget to display a list of items that can be selected. I assumed such a basic widget would exist in Iced, but I couldn't find it. If it doesn't exist, can anyone give me some hint on how to go about building it? I'm currently having a big list on Text items wrapped in Scrollable, but how do I add selection?
Thanks!
I believe the solution you're looking for is the PickList widget. Example here: https://github.com/iced-rs/iced/tree/master/examples/pick_list Docs: https://docs.rs/iced/latest/iced/widget/pick_list/index.html
I believe the solution you're looking for is the PickList widget.
Example here: https://github.com/iced-rs/iced/tree/master/examples/pick_list
Docs: https://docs.rs/iced/latest/iced/widget/pick_list/index.html
PickList is a drop down menu (QComboBox in Qt), I'm looking for a scrollable list of selectable items. Basically Scrollable with Rows, but I couldn't figure the selection part.
I'd guess you want either a Checkbox or a Radio, depending on whether you want multiple items to be selectable or not.
I'm looking for a scrollable list of selectable items. Basically Scrollable with Rows, but I couldn't figure the selection part.
I'm probably a bit late but I had the exact same need and ended up creating a widget which is simply a Row with a CheckBox and a Text (source code)
Considering PackageRow the name of the widget, I used a Vec<PackageRow> to populate a Column (like this)
Then, once you have a Column you can push into a Scrollable.