2015-05-09 59 views
1

在拉撒路(也可能DELPHI)文檔約grids,我們可以找到的InsertRow功能下一描述:拉撒路電網鍵值對

Function InsertRow 
    Inserts a row in the grid and sets 
    the Key-Value pair. Returns the 
    index of the newly inserted row. 

這是什麼鍵值對?

+0

正如你可以在你所提供的鏈接看到,此功能涉及到TValueListEditor,像在IDE對象檢查,但要簡單得多。 「鍵值對」與[TStrings名稱 - 值特性]相同(http://lazarus-ccr.sourceforge.net/docs/rtl/classes/tstrings.values.html) – Abelisto

+0

@Abelisto - 好吧, =值對被添加到網格線?或者線路收集網格?關鍵和價值是什麼? – hdrz

回答

1

這與TValueListEditor有關,而不是一般的網格。 TValueListEditor在外觀上與Delphi 對象檢查器類似。爲簡潔起見,我將在下面的文本中將其稱爲VLE

TValueListEditor.InsertRow有三個參數:

function InsertRow(const KeyName: string; const Value: string; 
    Append: Boolean): Integer; 

keyname參數是鍵(VLE的左欄)的名稱。 Value是關鍵值(VLE的右列)。它的存儲方式與Strings屬性中的TStrings鍵=值對相同。例如,使用InsertRow('Testing', '123', False)調用它將存儲Testing=123

Append僅控制是否在VLE中的任何已選項目之前或之後添加新條目。如果VLE爲空,則不起作用。

欲瞭解更多信息,請參閱Delphi VCL help

+0

謝謝,現在很清楚 – hdrz