0
Eclipse.org의 성운 격자를 사용하고 개별 셀에 액세스하려고합니다. grid.select (...)가 수행 할 수있는 개별 GridItem이 아니라 셀입니다. 내가 말했듯이 성운 격자 - 개별 셀 선택 (CellSelectionEnabled)
final Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
grid.setCellSelectionEnabled(true);
grid.setHeaderVisible(true);
GridColumn column = new GridColumn(grid, SWT.None);
column.setWidth(80);
GridColumn column2 = new GridColumn(grid, SWT.None);
column2.setWidth(80);
for(int i = 0; i<50; i++)
{
GridItem item = new GridItem(grid, SWT.None);
item.setText("Item" + i);
}
, grid.select 내가 원하는하지 않은, 전체 행을 선택 : 그래서 나는이 같은 그리드가 있다고 할 수 있습니다. 나는 또한 grid.selectCell (...)을 시도했지만, 어떤 이유로 든 작동하지 않을 것이다. 사용 된 좌표는 정확할 가능성이 높습니다.
Button btn = new Button(shell, SWT.PUSH);
btn.setText("test");
btn.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e){
Point pt = new Point(400,300);
grid.selectCell(pt);
}
});
어떤 아이디어입니까?