From 15e8e83251fffa5c36d33d0fa545d2a43fc1c336 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 13 Apr 2008 16:23:16 +0000 Subject: [PATCH] ide: add listview columns editor to list of component editors git-svn-id: trunk@14812 - --- ideintf/listviewpropedit.pp | 27 +++++++++++++++++++++------ ideintf/objinspstrconsts.pas | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ideintf/listviewpropedit.pp b/ideintf/listviewpropedit.pp index 8b5efbd610..cf64fd0a00 100644 --- a/ideintf/listviewpropedit.pp +++ b/ideintf/listviewpropedit.pp @@ -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 diff --git a/ideintf/objinspstrconsts.pas b/ideintf/objinspstrconsts.pas index 1f74e0e8e1..70b5b62d70 100644 --- a/ideintf/objinspstrconsts.pas +++ b/ideintf/objinspstrconsts.pas @@ -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';