Reputation: 63
my SWT Combo has a lot of items and the dropdownlist always shows only 5 items at the same time. (yes I can scroll up and down to see all the other items)
I want the dropdown list to show more items at the same time e.g. 10 items at the same time.
How can I make the dropdown list, to show more items at the same time? Has anyone an example? Thanks Jochen
Upvotes: 0
Views: 545
Reputation: 111142
Call the Combo
setVisibleItemCount(int count)
method to set the number of items that are shown.
Note that the JavaDoc says:
This operation is a hint and is not supported on platforms that do not have this concept.
So it may not work on all platforms.
Alternatively use the CCombo
control which also has a setVisibleItemCount
that does work on all platforms.
Upvotes: 2