Changeset 155 for trunk/Forms
- Timestamp:
- Aug 16, 2024, 9:51:02 AM (3 months ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormKeyShortcuts.lfm
r154 r155 32 32 Width = 127 33 33 end> 34 LargeImages = Core.ImageListLarge35 34 PopupMenu = PopupMenu1 36 35 ReadOnly = True 37 36 RowSelect = True 38 SmallImages = Core.ImageListSmall39 37 TabOrder = 0 40 38 ViewStyle = vsReport -
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 -
trunk/Forms/FormMain.pas
r154 r155 513 513 begin 514 514 if not Assigned(FormKeyShortcuts) then FormKeyShortcuts := TFormKeyShortcuts.Create(nil); 515 FormKeyShortcuts.ImageList := Core.Core.ImageListMain; 516 FormKeyShortcuts.MainForm := Self; 515 517 FormKeyShortcuts.SourceComponents.Clear; 516 518 FormKeyShortcuts.SourceComponents.Add(Self);
Note:
See TracChangeset
for help on using the changeset viewer.