| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- program ScrollWheelTestLCL1;
- {$mode objfpc}{$H+}
- uses
- {$IFDEF UNIX}
- cthreads,
- {$ENDIF}
- Interfaces, // this includes the LCL widgetset
- Fresnel, // initializes the widgetset
- Classes, SysUtils, Fresnel.Forms, Fresnel.Controls, Fresnel.Events,
- FCL.Events, Fresnel.Classes, Forms;
- type
- { TMainForm }
- TMainForm = class(TFresnelForm)
- Body: TBody;
- HeaderLabel: TLabel;
- BlaLabel: TLabel;
- public
- constructor CreateNew(AOwner: TComponent); override;
- end;
- { TMainForm }
- constructor TMainForm.CreateNew(AOwner: TComponent);
- begin
- inherited CreateNew(AOwner);
- Name:='MainForm';
- FormBounds:=BoundsRectFre(100,100,200,150);
- Stylesheet.Text:=''
- +'div {'+LineEnding
- +' border: 2px solid blue;'
- +' padding: 10px;'
- +'}'+LineEnding;
- Body:=TBody.Create(Self);
- with Body do begin
- Name:='Body';
- Style:='border: 1px solid green;';
- Parent:=Self;
- end;
- HeaderLabel:=TLabel.Create(Self);
- with HeaderLabel do begin
- Name:='HeaderLabel';
- Style:='border: 1px solid red;';
- Caption:='Fresnel is a visual component library based on CSS and custom drawn components';
- Parent:=Body;
- end;
- BlaLabel:=TLabel.Create(Self);
- with BlaLabel do begin
- Name:='BlaLabel';
- Style:='border: 1px solid blue; position: absolute; right: 1px;';
- Caption:='Bla';
- Parent:=Body;
- end;
- Visible:=true;
- end;
- var
- MainForm: TMainForm;
- {$R *.res}
- begin
- RequireDerivedFormResource:=True;
- Application.Scaled:=True;
- {$PUSH}{$WARN 5044 OFF}
- Application.MainFormOnTaskbar:=True;
- {$POP}
- Application.Initialize;
- Application.CreateForm(TMainForm, MainForm);
- Application.Run;
- end.
|