ScrollWheelTestLCL1.lpr 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. program ScrollWheelTestLCL1;
  2. {$mode objfpc}{$H+}
  3. uses
  4. {$IFDEF UNIX}
  5. cthreads,
  6. {$ENDIF}
  7. Interfaces, // this includes the LCL widgetset
  8. Fresnel, // initializes the widgetset
  9. Classes, SysUtils, Fresnel.Forms, Fresnel.Controls, Fresnel.Events,
  10. FCL.Events, Fresnel.Classes, Forms;
  11. type
  12. { TMainForm }
  13. TMainForm = class(TFresnelForm)
  14. Body: TBody;
  15. HeaderLabel: TLabel;
  16. BlaLabel: TLabel;
  17. public
  18. constructor CreateNew(AOwner: TComponent); override;
  19. end;
  20. { TMainForm }
  21. constructor TMainForm.CreateNew(AOwner: TComponent);
  22. begin
  23. inherited CreateNew(AOwner);
  24. Name:='MainForm';
  25. FormBounds:=BoundsRectFre(100,100,200,150);
  26. Stylesheet.Text:=''
  27. +'div {'+LineEnding
  28. +' border: 2px solid blue;'
  29. +' padding: 10px;'
  30. +'}'+LineEnding;
  31. Body:=TBody.Create(Self);
  32. with Body do begin
  33. Name:='Body';
  34. Style:='border: 1px solid green;';
  35. Parent:=Self;
  36. end;
  37. HeaderLabel:=TLabel.Create(Self);
  38. with HeaderLabel do begin
  39. Name:='HeaderLabel';
  40. Style:='border: 1px solid red;';
  41. Caption:='Fresnel is a visual component library based on CSS and custom drawn components';
  42. Parent:=Body;
  43. end;
  44. BlaLabel:=TLabel.Create(Self);
  45. with BlaLabel do begin
  46. Name:='BlaLabel';
  47. Style:='border: 1px solid blue; position: absolute; right: 1px;';
  48. Caption:='Bla';
  49. Parent:=Body;
  50. end;
  51. Visible:=true;
  52. end;
  53. var
  54. MainForm: TMainForm;
  55. {$R *.res}
  56. begin
  57. RequireDerivedFormResource:=True;
  58. Application.Scaled:=True;
  59. {$PUSH}{$WARN 5044 OFF}
  60. Application.MainFormOnTaskbar:=True;
  61. {$POP}
  62. Application.Initialize;
  63. Application.CreateForm(TMainForm, MainForm);
  64. Application.Run;
  65. end.