[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] TableViewer.setSelection() -> update/redraw/layout table
|
Hi!
while experimenting with JFace, i extended the TableViewer class and
overrode the remove() method like this (this is only for demonstration
purposes):
public void remove(Object[] elements) {
super.remove(elements);
setSelection(new StructuredSelection(getElementAt(0)),true);
}
The problem i found here is that the new selection is not shown
immediatly. Instead, i have to click in the table or resize the
table-window.
I already tried the following (didn't help, though):
getTable().layout(true, true);
getTable().getShell().layout(true, true);
refresh(true);
A dirty hack did help:
ViewerComparator comp = getComparator();
setComparator(null);
setComparator(comp);
But obviously, this is not a nice solution.
What am i doing wrong?