@Aruna, @MarkMLI. Thanks.
Let's see if we can get two-way traffic going in Lazarus City.
I have Windows 11 and Lazarus 2.2.6 (rev lazarus_2_2_6) FPC 3.2.2 x86_64-win64-win32/win64.
Let's go!
1. Project -> New Project -> Application
2. Project -> Save Project As (..\project1\project1.lpi)
3. From the Standard palette, drag and drop a Button1 onto Form1.
File -> Save All
4. Change code unit1.pas
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton; // manually
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
end.
File -> Save All
5. File -> Open -> unit1.lfm
Change code unit1.lfm
object Form1: TForm1
Left = 950
Height = 240
Top = 503
Width = 320
Caption = 'Form1'
ClientHeight = 240
ClientWidth = 320
DesignTimePPI = 120
LCLVersion = '2.2.6.0'
object Button1: TButton
Left = 104
Height = 31
Top = 32
Width = 94
Caption = 'Button1'
TabOrder = 0
end
object Button2: TButton
Left = 104
Height = 31
Top = 62
Width = 94
Caption = 'Button2'
TabOrder = 1
end
end
File -> Save All
6. Go to the Unit1.pas tab, then
File -> Save All
A dialog box will appear:
Some files have changed on disk -> Reload checked files from disk,
then
(see screenshot 1)
7. Run(F9) everything is fine (see screenshot 2)
So, Button1 was dragged and dropped onto Form1, and Button2 was added only using the Source Editor.