| [SOLVED] TableComboViewer Scrollbars? [message #1229400]
||Thu, 09 January 2014 11:15
| Ludwig Moser
Registered: July 2009
i am trying to use a TableComboViewer in one of my Applications.
i need to limit the visible items to 10 (because have thousands of entries in it and it simply shows me all on screen, which lets the dropdown pop upside...)
this is the way i create the TableComboViewer:
TableComboViewer tcv = new TableComboViewer(this, SWT.BORDER);
tcv.setLabelProvider(LookupLabelProvider.getInstance()); // this is a custom label provider
first idea was to use the setItemCount function of the tablecomboviewer
but this limits the entries to 10 rather than limiting the visible item count to 10 and adding a scrollbar...
next idea was to gain access to the TableCombo itself after it was created.
but this has no effect.
i tried adding this line after setting the visible item count (thought probably i need a refresh function?
but it draws the table lines fine, and still shows me ALL entries instead of 10...
EDIT: i noticed that if i enter the setVisibleItemCount before i set the ContentProvider and LabelProvider, i at least get the scrollbars (still too many items are shown!)
any ideas about this? is this a bug or am i doing something wrong?
thanks in advance!
[Updated on: Thu, 09 January 2014 12:20]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03315 seconds