Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Cell editors not working.
Cell editors not working. [message #449916] Mon, 31 January 2005 14:35
Eclipse UserFriend
Originally posted by: anunayashish.yahoo.com

I am trying to set cell editor to a table viewer as
CellEditor[] editors = new CellEditor[11];//Because their are 11 columns
in my table
if(i==8){//I want the eighth column to have a check box
CheckboxCellEditor oBox = new CheckboxCellEditor(oTable);
oBox.activate();
editors[i] = oBox;
}
else{
editors[i] = new TextCellEditor(oTable);
}

m_oTblViewer.setCellEditors(editors);//The cell editors are set to the
table here.

In my label provider I have added the function
public Boolean getColumnBoolean(Object element, int columnIndex) {
if(element instanceof PreviewData){
PreviewData oCell = (PreviewData)element;
if(columnIndex==8){
return oCell.getStrState();
}
}
return new Boolean(false);
}

The data fed in the table is as follows:
new PreviewData("12/05/02","12/17/02","1","B","37.00", "N","N","U",new
Boolean(true),"","",""," "," ");
Previous Topic:problems with TableViewer
Next Topic:SashForm - Need sticky component
Goto Forum:
  


Current Time: Tue Nov 12 10:35:37 GMT 2019

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

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

Back to the top