mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 09:19:32 +02:00
TValueListEditor: implement FindRow.
git-svn-id: trunk@40515 -
This commit is contained in:
parent
cf333ab605
commit
e085ecd22c
@ -164,6 +164,7 @@ type
|
||||
procedure DeleteColRow(IsColumn: Boolean; index: Integer);
|
||||
procedure DeleteRow(Index: Integer); override;
|
||||
procedure DeleteCol(Index: Integer); override;
|
||||
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 ExchangeColRow(IsColumn: Boolean; index, WithIndex: Integer);
|
||||
@ -745,6 +746,15 @@ begin
|
||||
Raise EGridException.CreateFmt(rsVLEInvalidRowColOperation,['DeleteCol','']);
|
||||
end;
|
||||
|
||||
function TValueListEditor.FindRow(const KeyName: string; out aRow: Integer): Boolean;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Index := Strings.IndexOfName(KeyName);
|
||||
Result := (Index > -1);
|
||||
if Result then aRow := Index + FixedRows;
|
||||
end;
|
||||
|
||||
procedure TValueListEditor.InsertColRow(IsColumn: boolean; index: integer);
|
||||
begin
|
||||
if not IsColumn then
|
||||
|
Loading…
Reference in New Issue
Block a user