ScrollWheelTest1.lpr 1.5 KB

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