mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 02:38:13 +02:00
ide: add listview columns editor to list of component editors
git-svn-id: trunk@14812 -
This commit is contained in:
parent
4d58d3242c
commit
15e8e83251
@ -304,24 +304,39 @@ end;
|
||||
procedure TListViewComponentEditor.ExecuteVerb(Index: Integer);
|
||||
var
|
||||
Hook: TPropertyEditorHook;
|
||||
AListView: TListView;
|
||||
begin
|
||||
if Index = 0 then
|
||||
begin
|
||||
GetHook(Hook);
|
||||
if EditListView(GetComponent as TListView) then
|
||||
AListView := GetComponent as TListView;
|
||||
case Index of
|
||||
0:
|
||||
begin
|
||||
GetHook(Hook);
|
||||
if EditListView(AListView) then
|
||||
if Assigned(Hook) then Hook.Modified(Self);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
GetHook(Hook);
|
||||
EditCollection(AListView, AListView.Columns, 'Columns');
|
||||
if Assigned(Hook) then Hook.Modified(Self);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TListViewComponentEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
Result := '';
|
||||
if Index = 0 then Result := sccsLvEdt;
|
||||
case Index of
|
||||
0: Result := sccsLvEdt;
|
||||
1: Result := sccsLvColEdt;
|
||||
else
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
function TListViewComponentEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 1;
|
||||
Result := 2;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -101,6 +101,7 @@ resourcestring
|
||||
// ListView Items Editor
|
||||
sccsLvEdtCaption = 'ListView Items Editor';
|
||||
sccsLvEdt = 'Edit ListView Items...';
|
||||
sccsLvColEdt = 'Edit Columns ...';
|
||||
sccsLvEdtGrpLCaption = 'Items';
|
||||
sccsLvEdtGrpRCaption = 'Item Properties';
|
||||
sccsLvEdtNewItem = 'New Item';
|
||||
|
Loading…
Reference in New Issue
Block a user