<table> and <table-column>
Creates Table and Table-Column.Example :
<table
style="SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL"
linesVisible="true" headerVisible="true" itemCount="1000"
SWT.SetData="com.sheelapps.swtml.examples.TestListener">
<table-column text="column1" style="SWT.LEFT"
width="150" />
<table-column text="column2" width="100" />
</table>
public class TestListener implements org.eclipse.swt.widgets.Listener
//// handleEvent()
if(event.widget instanceof Table) {
TableItem item = (TableItem) event.item;
int index =((Table) event.widget).indexOf (item);
item.setText (0,"Col 1 - " + index);
item.setText (1,"Col 2 - " + index);
}
Applications |
Links |
SWTML Links |
Share this Page |