mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +02:00
ValEdit: implement an adapted version of InsertRowWithValues.
git-svn-id: trunk@43110 -
This commit is contained in:
parent
00ac786d09
commit
d91315a258
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user