Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CheckboxTableViewer getCheckedElements() causes rows out of the visivle range to disappear on a Vir
CheckboxTableViewer getCheckedElements() causes rows out of the visivle range to disappear on a Vir [message #454601] Mon, 25 April 2005 14:26
Chad is currently offline ChadFriend
Messages: 7
Registered: July 2009
Junior Member
I have a virtual table that performs actions on checked rows after a button
is clicked. After this button is clicked all of the rows that were not
originally visible (the ones that you need to scroll to get to) disappear. I
have isolated it down to the TableItems getChecked() method:

Here is the getCheckedElements method from CheckboxTableViewer

public Object[] getCheckedElements() {
TableItem[] children = getTable().getItems();
ArrayList v = new ArrayList(children.length);
for (int i = 0; i < children.length; i++) {
TableItem item = children[i];
if (item.getChecked())
v.add(item.getData());
}
return v.toArray();
}

If you comment out the getChecked() line of code the table gets drawn
correctly.

I have posted this to both the platform and SWT newsgroups because I am not
sure if this an SWT problem or a problem with the way JFace uses SWT. I hope
I didn't commit to large of a posting taboo.

I am using 3.1 M5.

Thanks
Chad
Previous Topic:How to change the drop list of a CCombo?
Next Topic:OLE / OpenOffice / clientSite.save()
Goto Forum:
  


Current Time: Sun Mar 07 00:17:46 GMT 2021

Powered by FUDForum. Page generated in 0.02206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top