RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TValueListEditor.InsertRow Method

Inserts a row in the value list editor and a corresponding string into the associated TStrings object.

Pascal
function InsertRow(const KeyName: string; const Value: string; Append: Boolean): Integer;
C++
__fastcall int InsertRow(const AnsiString KeyName, const AnsiString Value, Boolean Append);

Call InsertRow to add a name/value pair to the value list editor and the TStrings object it is editing. 

InsertRow adds a string of the form

KeyName=Value

to the Strings property and updates the display to reflect the change. 

If the current row of the value list editor is empty (has no name or value portion), InsertRow assigns the new KeyName and Value to the current row. Otherwise, if the Append parameter is true, the new string appears after the currently selected row, while if Append is false, the new string appears before the currently selected row.

Note: InsertRow inserts the specified row regardless of the value of KeyOptions. The keyAdd member of KeyOptions controls only whether the user can add new rows by pressing the Insert key or navigating past the last row.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!