Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev] New topic in forum Nebula, called TableComboViewer Scrollbars?, by Ludwig Moser

Title: Eclipse Community Forums
Subject: TableComboViewer Scrollbars? Author: Ludwig Moser Date: Thu, 09 January 2014 06:15
Hello!

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.setContentProvider(new ArrayContentProvider());
tcv.setLabelProvider(LookupLabelProvider.getInstance()); // this is a custom label provider


first idea was to use the setItemCount function of the tablecomboviewer
tcv.setItemCount(10);

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.

tcv.getTableCombo().setVisibleItemCount(10);

but this has no effect.
i tried adding this line after setting the visible item count (thought probably i need a refresh function?
tcv.getTableCombo().setShowTableLines(true);

but it draws the table lines fine, and still shows me ALL entries instead of 10...

any ideas about this? is this a bug or am i doing something wrong?
thanks in advance!
[ Reply ][ Quote ][ View Topic/Message ][ Unsubscribe from this forum ]

Back to the top