+ // Locate the column, and add the column reference to Event object.
+ TreeColumn columns[] = parent.getColumns();
+ TreeColumn column = null;
+ int x = 0;
+ for (TreeColumn c : columns) {
+ int w = c.getWidth();
+ if (event.x >= x && event.x < (x+w)) {
+ column = c;
+ break;
+ }
+ x+=w;
+ }
+ event.data = column.getData();