mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 06:18:17 +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);
|
procedure TListViewComponentEditor.ExecuteVerb(Index: Integer);
|
||||||
var
|
var
|
||||||
Hook: TPropertyEditorHook;
|
Hook: TPropertyEditorHook;
|
||||||
|
AListView: TListView;
|
||||||
begin
|
begin
|
||||||
if Index = 0 then
|
AListView := GetComponent as TListView;
|
||||||
begin
|
case Index of
|
||||||
GetHook(Hook);
|
0:
|
||||||
if EditListView(GetComponent as TListView) then
|
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);
|
if Assigned(Hook) then Hook.Modified(Self);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TListViewComponentEditor.GetVerb(Index: Integer): string;
|
function TListViewComponentEditor.GetVerb(Index: Integer): string;
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
if Index = 0 then Result := sccsLvEdt;
|
case Index of
|
||||||
|
0: Result := sccsLvEdt;
|
||||||
|
1: Result := sccsLvColEdt;
|
||||||
|
else
|
||||||
|
Result := '';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TListViewComponentEditor.GetVerbCount: Integer;
|
function TListViewComponentEditor.GetVerbCount: Integer;
|
||||||
begin
|
begin
|
||||||
Result := 1;
|
Result := 2;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -101,6 +101,7 @@ resourcestring
|
|||||||
// ListView Items Editor
|
// ListView Items Editor
|
||||||
sccsLvEdtCaption = 'ListView Items Editor';
|
sccsLvEdtCaption = 'ListView Items Editor';
|
||||||
sccsLvEdt = 'Edit ListView Items...';
|
sccsLvEdt = 'Edit ListView Items...';
|
||||||
|
sccsLvColEdt = 'Edit Columns ...';
|
||||||
sccsLvEdtGrpLCaption = 'Items';
|
sccsLvEdtGrpLCaption = 'Items';
|
||||||
sccsLvEdtGrpRCaption = 'Item Properties';
|
sccsLvEdtGrpRCaption = 'Item Properties';
|
||||||
sccsLvEdtNewItem = 'New Item';
|
sccsLvEdtNewItem = 'New Item';
|
||||||
|
Loading…
Reference in New Issue
Block a user