| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- program ScrollWheelTest1;
- uses
- {$IFDEF Unix}
- cthreads,
- {$ENDIF}
- Fresnel, // initializes the widgetset
- Fresnel.App,
- Classes, SysUtils, Fresnel.Forms, Fresnel.Controls, Fresnel.Events,
- FCL.Events, Fresnel.Classes;
- 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;
- begin
- Application.HookFresnelLog:=true;
- Application.Initialize;
- Application.CreateForm(TMainForm,MainForm);
- Application.Run;
- end.
|