【问题标题】:Start typing in a selected cell of a stringgrid开始在字符串网格的选定单元格中输入
【发布时间】:2013-03-04 23:04:22
【问题描述】:

使用 Dephi XE,当用户单击按钮时,我希望能够在 StringGrid (SG) 中选择一个单元格(没问题),然后允许用户立即开始输入该单元格。

SG.Row := DesiredRow;
SG.Col := 1;
SG.SetFocus;

这会将所需的单元格设置为蓝色,但用户必须单击一个单元格才能输入。我希望用户能够在单击按钮后立即开始输入,而无需使用鼠标。

【问题讨论】:

    标签: delphi tstringgrid


    【解决方案1】:

    将 stringgrid 的 EditorMode 设置为 true:SG.EditorMode := True; 'goEditing' 应该在 Options 属性中设置才能正常工作。

    或者,您可以在网格Options 中设置goAlwaysShowEditor 之外的goEditing

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多