在关于grids的lazarus(也可能是delphi)文档中,我们可以找到InsertRow
函数的下一个描述:
Function InsertRow
Inserts a row in the grid and sets
the Key-Value pair. Returns the
index of the newly inserted row.
这个键值对是什么?
答案 0 :(得分:1)
这与TValueListEditor有关,而不是一般的网格。 TValueListEditor
在外观上与Delphi Object Inspector 类似。为简洁起见,我将在下文中将其称为 VLE 。
TValueListEditor.InsertRow
有三个参数:
function InsertRow(const KeyName: string; const Value: string;
Append: Boolean): Integer;
keyname
参数是密钥的名称(VLE的左列)。 Value
是关键值(VLE的右列)。它的存储方式与TStrings
属性中的Strings
key = value对的存储方式相同。例如,使用InsertRow('Testing', '123', False)
调用它会存储Testing=123
。
Append
仅控制是否在VLE中任何已选择的项目之前或之后添加新条目。如果VLE为空,则无效。
有关详细信息,请参阅Delphi VCL help