【发布时间】:2020-11-09 17:33:48
【问题描述】:
当使用 MultiLineTextCellEditor 在 nattable 中编辑多个单元格内容时,打开的 CellEditorDialog 文本区域会在单击 Enter 时折叠,而不是如下图所示的 OK 按钮。
回车前
回车后
MultiLineTextCellEditor textCellEditor = new MultiLineTextCellEditor(true) {
/**
* {@inheritDoc}
*/
@Override
public boolean openInline(final IConfigRegistry configRegistry, final List<String> configLabels) {
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean openMultiEditDialog() {
return super.openMultiEditDialog();
}
};
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, textCellEditor, DisplayMode.NORMAL,
COMMENT_CNG_LBL + "_" + COMMENT_COL_NUMBER);
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE,
DisplayMode.EDIT, COMMENT_CNG_LBL + "_" + COMMENT_COL_NUMBER);
但在 nattable 中使用 TextCellEditor 时不会出现类似问题。
我需要多行内联单元格编辑功能,所以我不能使用 TextCellEditor
如果我遗漏了一些特定的配置,请告诉我。
【问题讨论】:
标签: eclipse eclipse-rcp nattable