856 views
in Embedded Wizard Studio by
Hi All,

How to select all items/multiple items in a vertical list.

1 Answer

0 votes
by

Hello,

the Vertical List manages single selection only. However, you can implement multiple selection too. In such case:

1. Don't use the selection functionality of the list itself.

2. Instead, manage the selection status in each item as a bool property. This means, in your item class add a property and name it e.g. Selected. Ensure the property is of bool type.

3. Implement the properties onset method. The implementation should update the appearance of the item depending on whether it is selected or not,

4. When loading items, query the selection status of the respective item and initialize the selection property accordingly. For example:

5. When the user interacts with the application and the selection of an item is changed, you modify only the data in your storage and then you trigger the list reload the respective item. Consequently the item is reloaded showing the its selection status.

I hope it helps you further.

Best regards

Paul Banach

by
Could you please explain me with an example.
by

Hello,

see the attachment below. It contains an example created according to the above instructions. When you start the application in Prototyper you can tap on the list items and the items toggle their selection. Please remember: the list component does not manage any list data storage. It is just a view. It's up to you how the list data is stored.

Embedded Wizard 10.00 or newer project: multiple-selection-vertical-list

Best regards

Paul Banach

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...