Hi,
in vaadin 8 it was possible to get the index of a component in a layout ( layout.getComponentIndex(component) )
How is it possible in vaadin 14 ?
Thanks
Hi,
in vaadin 8 it was possible to get the index of a component in a layout ( layout.getComponentIndex(component) )
How is it possible in vaadin 14 ?
Thanks
What you are looking for is the method layout.indexOf(component);
. This method is defined in the interface com.vaadin.flow.component.HasOrderedComponents
, which for example VerticalLayout
and HorizontalLayout
are implementing.
Kaspar Scherrer:
What you are looking for is the methodlayout.indexOf(component);
. This method is defined in the interfaceHasOrderedComponents
, which for exampleVerticalLayout
andHorizontalLayout
are implementing.
Perfect, thanks