-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDW.DESIGN.AccordionEditor.pas
More file actions
55 lines (44 loc) · 1.28 KB
/
DW.DESIGN.AccordionEditor.pas
File metadata and controls
55 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
unit DW.DESIGN.AccordionEditor;
interface
uses
DesignEditors, DesignIntf, Forms, DW.VCL.Accordion;
type
TDWAccordionEditor = class(TComponentEditor)
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
implementation
{ TCSDBGridEditor }
procedure TDWAccordionEditor.ExecuteVerb(Index: Integer);
var
Item: TDWAccordionItem;
begin
inherited;
case Index of
0:
begin
Item := TDWAccordionItem(Designer.CreateChild(TDWAccordionItem, Component));
TDWAccordion(Component).InsertItem(Item);
// Item:= TDWAccordion(Component).CreateItem(Component);
// Item.Name:= Designer.UniqueName(Item.ClassName);
// TDWAccordion(Component).CreateItem(Component).Name:= Designer.UniqueName(Item.ClassName);;
end;
(* 1: Application.MessageBox(PChar(' TSDDBGrid' + #13#10#13#10 + '版本: 6.0'
+ ' (编译版本: 6.0.6.12)' + #13#10#13#10 + ''),
'About ...', 64); *)
end;
end;
function TDWAccordionEditor.GetVerb(Index: Integer): string;
begin
case Index of
0:
Result := 'Add Item';
// 1: Result := 'Remove Item';
end;
end;
function TDWAccordionEditor.GetVerbCount: Integer;
begin
Result := 1;
end;
end.