Changeset 584 for Common/Forms
- Timestamp:
- Jan 17, 2025, 8:00:49 AM (5 weeks ago)
- Location:
- Common/Forms
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Forms/FormAbout.lfm
r566 r584 1 1 object FormAbout: TFormAbout 2 2 Left = 624 3 Height = 4023 Height = 397 4 4 Top = 622 5 Width = 7 025 Width = 714 6 6 Caption = 'About' 7 ClientHeight = 4028 ClientWidth = 7 027 ClientHeight = 397 8 ClientWidth = 714 9 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 11 Position = poScreenCenter 12 LCLVersion = ' 2.2.6.0'12 LCLVersion = '3.6.0.0' 13 13 object LabelDescription: TLabel 14 14 Left = 30 15 15 Height = 26 16 16 Top = 135 17 Width = 6 4217 Width = 654 18 18 Align = alTop 19 19 BorderSpacing.Left = 30 … … 29 29 Height = 26 30 30 Top = 191 31 Width = 6 4231 Width = 654 32 32 Align = alTop 33 33 BorderSpacing.Around = 30 … … 40 40 Height = 135 41 41 Top = 0 42 Width = 7 0242 Width = 714 43 43 Align = alTop 44 44 BevelOuter = bvNone 45 45 ClientHeight = 135 46 ClientWidth = 7 0246 ClientWidth = 714 47 47 FullRepaint = False 48 48 ParentFont = False … … 52 52 Height = 84 53 53 Top = 20 54 Width = 5 6454 Width = 576 55 55 Anchors = [akTop, akLeft, akRight] 56 56 AutoSize = False … … 74 74 Left = 0 75 75 Height = 75 76 Top = 32 777 Width = 7 0276 Top = 322 77 Width = 714 78 78 Align = alBottom 79 79 BevelOuter = bvNone 80 80 ClientHeight = 75 81 ClientWidth = 7 0281 ClientWidth = 714 82 82 TabOrder = 1 83 83 object ButtonHomePage: TButton … … 88 88 Anchors = [akLeft, akBottom] 89 89 Caption = 'Home page' 90 OnClick = ButtonHomePageClick91 90 ParentFont = False 92 91 TabOrder = 0 92 OnClick = ButtonHomePageClick 93 93 end 94 94 object ButtonClose: TButton 95 Left = 5 3195 Left = 543 96 96 Height = 38 97 97 Top = 24 -
Common/Forms/FormItem.lfm
r583 r584 1 1 object FormItem: TFormItem 2 Left = 10403 Height = 3974 Top = 5405 Width = 4692 Left = 441 3 Height = 446 4 Top = 395 5 Width = 577 6 6 Caption = 'Item' 7 ClientHeight = 3978 ClientWidth = 4697 ClientHeight = 446 8 ClientWidth = 577 9 9 DesignTimePPI = 144 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy 12 LCLVersion = '3. 4.0.0'12 LCLVersion = '3.6.0.0' 13 13 object ButtonOk: TButton 14 Left = 3 4414 Left = 332 15 15 Height = 38 16 Top = 35316 Top = 402 17 17 Width = 113 18 18 Anchors = [akRight, akBottom] … … 24 24 end 25 25 object ButtonCancel: TButton 26 Left = 20826 Left = 456 27 27 Height = 38 28 Top = 35328 Top = 402 29 29 Width = 113 30 30 Anchors = [akRight, akBottom] … … 36 36 object ScrollBox1: TScrollBox 37 37 Left = 8 38 Height = 3 3438 Height = 383 39 39 Top = 8 40 Width = 45340 Width = 561 41 41 HorzScrollBar.Page = 1 42 42 VertScrollBar.Page = 1 -
Common/Forms/FormItem.pas
r583 r584 176 176 if DataType = dtString then begin 177 177 NewControl := TEdit.Create(nil); 178 NewControl.Width := Scale96ToScreen( 300);178 NewControl.Width := Scale96ToScreen(200); 179 179 end else 180 180 if DataType = dtColor then begin -
Common/Forms/FormKeyShortcuts.lfm
r580 r584 11 11 OnDestroy = FormDestroy 12 12 OnShow = FormShow 13 LCLVersion = '3. 4.0.0'13 LCLVersion = '3.6.0.0' 14 14 object ListView1: TListView 15 Left = 5 16 Height = 319 17 Top = 5 18 Width = 694 19 Align = alClient 20 BorderSpacing.Around = 5 15 Left = 10 16 Height = 262 17 Top = 10 18 Width = 684 19 Align = alTop 20 Anchors = [akTop, akLeft, akRight, akBottom] 21 BorderSpacing.Around = 10 21 22 Columns = < 22 23 item … … 42 43 OnKeyPress = ListView1KeyPress 43 44 end 45 object ButtonClose: TButton 46 Left = 581 47 Height = 37 48 Top = 284 49 Width = 113 50 Anchors = [akRight, akBottom] 51 Caption = 'Close' 52 ModalResult = 11 53 TabOrder = 1 54 OnClick = ButtonCloseClick 55 end 44 56 object PopupMenu1: TPopupMenu 45 57 Left = 408 … … 55 67 Column = 0 56 68 Order = soNone 57 Left = 2 0058 Top = 1 6069 Left = 221 70 Top = 144 59 71 end 60 72 end -
Common/Forms/FormKeyShortcuts.lrj
r580 r584 4 4 {"hash":98585447,"name":"tformkeyshortcuts.listview1.columns[1].caption","sourcebytes":[87,105,110,100,111,119],"value":"Window"}, 5 5 {"hash":258584404,"name":"tformkeyshortcuts.listview1.columns[2].caption","sourcebytes":[83,104,111,114,116,99,117,116],"value":"Shortcut"}, 6 {"hash":4863637,"name":"tformkeyshortcuts.buttonclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}, 6 7 {"hash":216771813,"name":"tformkeyshortcuts.menuitem1.caption","sourcebytes":[69,120,101,99,117,116,101],"value":"Execute"} 7 8 ]} -
Common/Forms/FormKeyShortcuts.pas
r580 r584 13 13 14 14 TFormKeyShortcuts = class(TFormEx) 15 ButtonClose: TButton; 15 16 ListView1: TListView; 16 17 ListViewSort1: TListViewSort; 17 18 MenuItem1: TMenuItem; 18 19 PopupMenu1: TPopupMenu; 20 procedure ButtonCloseClick(Sender: TObject); 19 21 procedure FormCreate(Sender: TObject); 20 22 procedure FormDestroy(Sender: TObject); … … 25 27 procedure MenuItem1Click(Sender: TObject); 26 28 private 27 function GetImage List: TCustomImageList;28 procedure SetImage List(AValue: TCustomImageList);29 function GetImages: TCustomImageList; 30 procedure SetImages(AValue: TCustomImageList); 29 31 public 30 32 SourceComponents: TObjectList<TComponent>; 31 33 MainForm: TForm; 32 34 procedure LoadFromComponent(C: TComponent); 33 property Image List: TCustomImageList read GetImageList write SetImageList;35 property Images: TCustomImageList read GetImages write SetImages; 34 36 end; 35 37 … … 49 51 SShortcut = 'Shortcut'; 50 52 SKeyShortcuts = 'Key shortcuts'; 53 SClose = 'Close'; 51 54 52 55 { TFormKeyShortcuts } … … 105 108 end; 106 109 110 procedure TFormKeyShortcuts.ButtonCloseClick(Sender: TObject); 111 begin 112 Close; 113 end; 114 107 115 procedure TFormKeyShortcuts.FormDestroy(Sender: TObject); 108 116 begin … … 116 124 end; 117 125 118 function TFormKeyShortcuts.GetImage List: TCustomImageList;126 function TFormKeyShortcuts.GetImages: TCustomImageList; 119 127 begin 120 128 Result := ListView1.SmallImages; 121 129 end; 122 130 123 procedure TFormKeyShortcuts.SetImage List(AValue: TCustomImageList);131 procedure TFormKeyShortcuts.SetImages(AValue: TCustomImageList); 124 132 begin 125 133 ListView1.SmallImages := AValue; -
Common/Forms/FormList.lfm
r583 r584 1 1 object FormList: TFormList 2 2 Left = 1040 3 Height = 3 003 Height = 360 4 4 Top = 540 5 Width = 4 005 Width = 480 6 6 Caption = 'List' 7 ClientHeight = 3 008 ClientWidth = 4 009 DesignTimePPI = 1 207 ClientHeight = 360 8 ClientWidth = 480 9 DesignTimePPI = 144 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy … … 14 14 object ListView1: TListView 15 15 Left = 0 16 Height = 26816 Height = 322 17 17 Top = 0 18 Width = 4 0018 Width = 480 19 19 Align = alClient 20 20 Columns = < 21 21 item 22 22 Caption = 'Name' 23 Width = 38923 Width = 467 24 24 end> 25 25 MultiSelect = True … … 40 40 object ToolBar1: TToolBar 41 41 Left = 0 42 Top = 268 43 Width = 400 42 Height = 38 43 Top = 322 44 Width = 480 44 45 Align = alBottom 45 46 ParentFont = False … … 53 54 end 54 55 object ToolButton2: TToolButton 55 Left = 3 056 Left = 36 56 57 Top = 2 57 58 Action = AModify 58 59 end 59 60 object ToolButton3: TToolButton 60 Left = 5961 Left = 71 61 62 Top = 2 62 63 Action = ARemove 63 64 end 64 65 object ToolButton4: TToolButton 65 Left = 8866 Left = 106 66 67 Top = 2 67 68 Action = AClone … … 69 70 end 70 71 object ActionList1: TActionList 71 Left = 17472 Top = 1 3372 Left = 209 73 Top = 160 73 74 object AAdd: TAction 74 75 Caption = 'Add' … … 101 102 end 102 103 object PopupMenu1: TPopupMenu 103 Left = 294104 Top = 1 33104 Left = 353 105 Top = 160 105 106 object MenuItem1: TMenuItem 106 107 Action = AAdd -
Common/Forms/FormList.pas
r583 r584 72 72 SRemoveItems = 'Remove items'; 73 73 SRemoveItemsQuery = 'Do you want to remove selected items?'; 74 SNew = 'New';75 74 76 75 { TFormList } … … 129 128 FormItem := TFormItem.Create(Self); 130 129 try 131 TempEntry.Name := FList.GetNextAvailableName( SNew + ' ' + LowerCase(List.GetName));130 TempEntry.Name := FList.GetNextAvailableName(List.GetName); 132 131 FormItem.Item := TempEntry; 133 132 if FormItem.ShowModal = mrOk then begin … … 204 203 ItemFields: TItemFields; 205 204 ItemField: TItemField; 205 DrawRect: TRect; 206 206 begin 207 207 ItemFields := TItem(Item.Data).GetFields; 208 208 try 209 209 ItemField := ItemFields[SubItem]; 210 if ItemField.DataType = dtColor then211 with ListView1.Canvas dobegin210 with ListView1.Canvas do 211 if ItemField.DataType = dtColor then begin 212 212 Brush.Color := TItem(Item.Data).GetValueColor(ItemField.Index); 213 213 Brush.Style := bsSolid; 214 FillRect(Item.DisplayRectSubItem(SubItem, drBounds)); 215 end; 214 DrawRect := Item.DisplayRectSubItem(SubItem, drBounds); 215 {$IFDEF LCLQT5} 216 // TODO: Wrong rectangle width on Qt5 217 if DrawRect.Width > ListView1.Columns[SubItem].Width then 218 DrawRect.Width := ListView1.Columns[SubItem].Width; 219 {$ENDIF} 220 FillRect(DrawRect); 221 end; 216 222 finally 217 223 ItemFields.Free; -
Common/Forms/FormTest.lfm
r566 r584 8 8 ClientWidth = 865 9 9 DesignTimePPI = 144 10 LCLVersion = '2.2.6.0' 10 OnShow = FormShow 11 LCLVersion = '3.6.0.0' 11 12 object MemoLog: TMemo 12 13 Left = 8 13 Height = 50514 Height = 464 14 15 Top = 8 15 16 Width = 849 16 Align = alClient 17 Align = alTop 18 Anchors = [akTop, akLeft, akRight, akBottom] 17 19 BorderSpacing.Around = 8 18 20 ReadOnly = True … … 20 22 TabOrder = 0 21 23 end 24 object ButtonRun: TButton 25 Left = 616 26 Height = 37 27 Top = 480 28 Width = 112 29 Anchors = [akRight, akBottom] 30 Caption = 'Run' 31 TabOrder = 1 32 OnClick = ButtonRunClick 33 end 34 object ButtonClose: TButton 35 Left = 745 36 Height = 37 37 Top = 480 38 Width = 112 39 Anchors = [akRight, akBottom] 40 Caption = 'Close' 41 ModalResult = 11 42 TabOrder = 2 43 OnClick = ButtonRunClick 44 end 22 45 end -
Common/Forms/FormTest.lrj
r566 r584 1 1 {"version":1,"strings":[ 2 {"hash":371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"} 2 {"hash":371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"}, 3 {"hash":22974,"name":"tformtest.buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"}, 4 {"hash":4863637,"name":"tformtest.buttonclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"} 3 5 ]} -
Common/Forms/FormTest.pas
r566 r584 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, FormEx; 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, FormEx, 7 TestCase; 7 8 8 9 type … … 11 12 12 13 TFormTest = class(TFormEx) 14 ButtonRun: TButton; 15 ButtonClose: TButton; 13 16 MemoLog: TMemo; 17 procedure FormShow(Sender: TObject); 18 procedure ButtonRunClick(Sender: TObject); 19 private 20 FTestCase: TTestCase; 21 procedure SetTestCase(AValue: TTestCase); 22 public 23 property TestCase: TTestCase read FTestCase write SetTestCase; 14 24 end; 15 25 … … 19 29 {$R *.lfm} 20 30 31 { TFormTest } 32 33 procedure TFormTest.FormShow(Sender: TObject); 34 begin 35 if Assigned(FTestCase) then MemoLog.Text := FTestCase.Log; 36 end; 37 38 procedure TFormTest.SetTestCase(AValue: TTestCase); 39 begin 40 if FTestCase = AValue then Exit; 41 FTestCase := AValue; 42 end; 43 44 procedure TFormTest.ButtonRunClick(Sender: TObject); 45 begin 46 if Assigned(FTestCase) then begin 47 FTestCase.Run; 48 MemoLog.Text := FTestCase.Log; 49 end; 50 end; 51 21 52 end. 22 53 -
Common/Forms/FormTests.lfm
r566 r584 9 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 LCLVersion = ' 2.2.6.0'11 LCLVersion = '3.6.0.0' 12 12 object ListViewTestCases: TListView 13 13 Left = 19 … … 36 36 end 37 37 object ButtonRun: TButton 38 Left = 94538 Left = 816 39 39 Height = 37 40 40 Top = 585 … … 42 42 Anchors = [akRight, akBottom] 43 43 Caption = 'Run' 44 TabOrder = 1 44 45 OnClick = ButtonRunClick 45 TabOrder = 146 46 end 47 47 object LabelResult: TLabel … … 53 53 Caption = ' ' 54 54 ParentColor = False 55 end 56 object ButtonClose: TButton 57 Left = 945 58 Height = 37 59 Top = 585 60 Width = 112 61 Anchors = [akRight, akBottom] 62 Caption = 'Close' 63 ModalResult = 11 64 TabOrder = 2 65 OnClick = ButtonRunClick 55 66 end 56 67 object ActionList1: TActionList -
Common/Forms/FormTests.lrj
r566 r584 5 5 {"hash":22974,"name":"tformtests.buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"}, 6 6 {"hash":8736,"name":"tformtests.labelresult.caption","sourcebytes":[32,32,32],"value":" "}, 7 {"hash":4863637,"name":"tformtests.buttonclose.caption","sourcebytes":[67,108,111,115,101],"value":"Close"}, 7 8 {"hash":368487,"name":"tformtests.ashow.caption","sourcebytes":[83,104,111,119],"value":"Show"}, 8 9 {"hash":22974,"name":"tformtests.arun.caption","sourcebytes":[82,117,110],"value":"Run"} -
Common/Forms/FormTests.pas
r566 r584 16 16 ActionList1: TActionList; 17 17 ButtonRun: TButton; 18 ButtonClose: TButton; 18 19 LabelResult: TLabel; 19 20 ListViewTestCases: TListView; … … 119 120 with TFormTest.Create(nil) do 120 121 try 121 MemoLog.Text := TTestCase(ListViewTestCases.Selected.Data).Log;122 TestCase := TTestCase(ListViewTestCases.Selected.Data); 122 123 ShowModal; 124 ReloadList; 123 125 finally 124 126 Free;
Note:
See TracChangeset
for help on using the changeset viewer.