Hi,
I need to create a ListBox in which I want to list a series of pre-defined HorizontalLayouts.
Is it even possible to do?
Because I have created my ListBox object like this (defining and setting the items with HorizontalLayout type), but in practice the items are being converted to String (refer to attachment).
List<HorizontalLayout> items = new ArrayList<>();
ListBox<HorizontalLayout> listBox = new ListBox<>();
for (int i=1; i <= 10; i++) {
// getItem() returns a HorizontalLayout
items.add(getItem());
}
listBox.setItems(items);