Changeset 155 for trunk/Forms/FormKeyShortcuts.pas
- Timestamp:
- Aug 16, 2024, 9:51:02 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormKeyShortcuts.pas
r154 r155 5 5 uses 6 6 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, 7 ComCtrls, ActnList, LCLProc, Menus, FormEx, Generics.Collections ;7 ComCtrls, ActnList, LCLProc, Menus, FormEx, Generics.Collections, ImgList; 8 8 9 9 type … … 19 19 procedure FormShow(Sender: TObject); 20 20 procedure MenuItem1Click(Sender: TObject); 21 private 22 function GetImageList: TCustomImageList; 23 procedure SetImageList(AValue: TCustomImageList); 21 24 public 22 25 SourceComponents: TObjectList<TComponent>; 26 MainForm: TForm; 23 27 procedure LoadFromComponent(C: TComponent); 28 property ImageList: TCustomImageList read GetImageList write SetImageList; 24 29 end; 25 30 … … 27 32 implementation 28 33 29 uses 30 FormMain; 34 {$R *.lfm} 31 35 32 36 resourcestring … … 67 71 end; 68 72 73 function TFormKeyShortcuts.GetImageList: TCustomImageList; 74 begin 75 Result := ListView1.SmallImages; 76 end; 77 78 procedure TFormKeyShortcuts.SetImageList(AValue: TCustomImageList); 79 begin 80 ListView1.SmallImages := AValue 81 end; 82 69 83 procedure TFormKeyShortcuts.LoadFromComponent(C: TComponent); 70 84 var … … 84 98 NewItem.Data := TAction(Actions[I]); 85 99 with NewItem.SubItems do begin 86 if C.Owner is TFormMainthen Add(SMainForm)100 if C.Owner = MainForm then Add(SMainForm) 87 101 else if C.Owner is TDataModule then Add(SGlobal) 88 102 else if C.Owner is TForm then Add(TForm(C.Owner).Caption) … … 96 110 end; 97 111 98 initialization99 {$I FormKeyShortcuts.lrs}100 101 112 end. 102 113
Note:
See TracChangeset
for help on using the changeset viewer.