public void editorTable(Table table,Event e){
final TableEditor editor = new TableEditor(table);
editor.horizontalAlignment = SWT.LEFT;
editor.verticalAlignment=SWT.LEFT;
editor.grabHorizontal = true;
Rectangle clientArea = table.getClientArea();
Point pt = new Point(e.x, e.y);
int index = table.getTopIndex();
while (index < table.getItemCount())
{
boolean visible = false;
final TableItem item = table.getItem(index);
for (int i = 0; i < table.getColumnCount(); i++)
{
Rectangle rect = item.getBounds(i);
if (rect.contains(pt))
{
final int column = i;
final Text text = new Text(table, SWT.NONE);
Listener textListener = new Listener()
{
实现SWT中Table单元格的可编辑
最新推荐文章于 2024-06-14 14:08:37 发布