【问题标题】:Issue when clicking enter button in CellEditorDialog using MultiLineTextCellEditor in nattable eclispe在 nattable eclipse 中使用 MultiLine TextCellEditor 在 CellEditor 对话框中单击 enter 按钮时出现问题
【发布时间】: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


    【解决方案1】:

    对于单个单元格,您想内联编辑多行文本,我是否理解正确?

    因为它看起来像一个错误。当为多行值打开多值对话框时,对话框应显示多行输入字段。但在你的情况下,它只显示一个单行输入字段。所以我假设配置在这里发生冲突。

    随时通过 Bugzilla 开票。

    【讨论】:

      猜你喜欢
      • 2019-01-30
      • 2012-07-06
      • 1970-01-01
      • 2020-05-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-26
      • 1970-01-01
      相关资源
      最近更新 更多