Tuesday, June 8, 2010

How to increase Row Widths in a SWT Code

final Table table = new Table(composite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
table.setLinesVisible(true);
table.setSize(555, 555);
// resize the row height using a MeasureItem listener
table.addListener(SWT.MeasureItem, new Listener() {
public void handleEvent(Event event) {
// height cannot be per row so simply set
event.height = 20;
}
});