ValEdit: implement an adapted version of InsertRowWithValues.

git-svn-id: trunk@43110 -
This commit is contained in:
bart 2013-10-05 22:03:28 +00:00
parent 00ac786d09
commit d91315a258

View File

@ -174,6 +174,7 @@ type
function FindRow(const KeyName: string; out aRow: Integer): Boolean;
procedure InsertColRow(IsColumn: boolean; index: integer);
function InsertRow(const KeyName, Value: string; Append: Boolean): Integer;
procedure InsertRowWithValues(Index: Integer; Values: array of String);
procedure ExchangeColRow(IsColumn: Boolean; index, WithIndex: Integer);
function IsEmptyRow: Boolean; {Delphi compatible function}
function IsEmptyRow(aRow: Integer): Boolean; {This for makes more sense to me}
@ -842,6 +843,23 @@ begin
if (NewCol <> Col) then Col := NewCol;
end;
procedure TValueListEditor.InsertRowWithValues(Index: Integer;
Values: array of String);
var
AKey, AValue: String;
begin
AKey := '';
AValue := '';
if (Length(Values) > 1) then
begin
AKey := Values[0];
AValue := Values[1];
end
else if (Length(Values) = 1) then
AKey := Values[0];
Strings.InsertItem(Index, AKey + Strings.NameValueSeparator + AValue);
end;
procedure TValueListEditor.ExchangeColRow(IsColumn: Boolean; index,
WithIndex: Integer);
begin