Populates the ListView with a string list. Args: items (list): list of strings to fill the widget with.
(cls, items, **kwargs)
| 2591 | |
| 2592 | @classmethod |
| 2593 | def new_from_list(cls, items, **kwargs): |
| 2594 | """Populates the ListView with a string list. |
| 2595 | |
| 2596 | Args: |
| 2597 | items (list): list of strings to fill the widget with. |
| 2598 | """ |
| 2599 | obj = cls(**kwargs) |
| 2600 | for item in items: |
| 2601 | obj.append(ListItem(item)) |
| 2602 | return obj |
| 2603 | |
| 2604 | def append(self, value, key=''): |
| 2605 | """Appends child items to the ListView. The items are accessible by list.children[key]. |