I want to display a horizontal combo box in Vaadin. Is it possible to do that? If no, what is the best component to put in a custom component to accomplish this task? Like a Button that I change CSS for onClick or a Resource using another listener to highlight.
Asked
Active
Viewed 787 times
2
-
Horizontal image picker or combobox? what should this component do? – d2k2 Jul 31 '14 at 18:41
-
@d2k2: The component is a horizontal image picker, allowing user to select only one image. I'm looking for a component that can be "selected" like a table cell or something. – vplusplus Jul 31 '14 at 19:26
-
a very simple way would be to use a HorizontalLayout where you put the images in. Then you have to decide how you scroll trough the images. either by a scroll bar or with a "forward" and "backward" button. – d2k2 Aug 01 '14 at 07:38
1 Answers
3
You can do something like that just by composing components: a HorizontalVertical
or a VerticalLayout
as the root layout, Image
components to display the images and then add a LayoutClickListener
to the layout to get the selected/clicked image. To highlight a selected Image
you can add a style name for that in your LayoutClickListener
.
There are also addons available in Vaadin Directory, which might be suitable for your needs:

Henri Kerola
- 4,947
- 1
- 17
- 19