--- title: ListSelect order: 17 layout: page --- [[components.listselect]] = ListSelect ifdef::web[] [.sampler] image:{live-demo-image}[alt="Live Demo", link="http://demo.vaadin.com/sampler/#ui/data-input/multiple-value/list-select"] endif::web[] The [classname]#ListSelect# component is list box that shows the selectable items in a vertical list. If the number of items exceeds the height of the component, a scrollbar is shown. The component allows selecting multiple values. [source, java] ---- // Create the selection component ListSelect select = new ListSelect<>("The List"); // Add some items select.setItems("Mercury", "Venus", "Earth", ...); // Show 5 items and a scrollbar if there are more select.setRows(5); select.addValueChangeListener(event -> { Set selected = event.getNewSelection(); Notification.show(selected.size() + " items."); }); ---- The number of visible items is set with [methodname]#setRows()#. [[figure.components.listselect.basic]] .The [classname]#ListSelect# Component image::img/listselect-basic.png[width=35%, scaledwidth=50%] Common selection component features are described in <>. == CSS Style Rules [source, css] ---- .v-select {} .v-select-select {} option {} ---- The component has an overall [literal]#++v-select++# style. The native [literal]#++ Apache XML Graphics FOP: https://github.com/apache/xmlgraphics-fopwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: db6057398689c608134034d50b7235b8f09f3f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117