[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: SWT Table

say somethin like this

// Determine where the mouse was clicked
Point pt = new Point(event.x, event.y);
// Determine which row was selected
final TableItem item = orderTable.getItem(pt);
if (item != null) {
// Determine which column was selected
int column = -1;
for (int i = 0, n = orderTable.getColumnCount(); i < n; i++) {
Rectangle rect = item.getBounds(i);
if (rect.contains(pt)) {
// This is the selected column
column = i;
break;
}
}
if (column == the column that you want) {
//your logic goes here
}