MainUnit.pas 913 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. unit MainUnit;
  2. {$mode ObjFPC}{$H+}
  3. interface
  4. uses
  5. Classes, SysUtils, Fresnel.Forms, Fresnel.Controls, Fresnel.Events,
  6. FCL.Events, Fresnel.DemoRadioButton;
  7. type
  8. { TMainForm }
  9. TMainForm = class(TFresnelForm)
  10. Body1: TBody;
  11. Div1: TDiv;
  12. procedure MainFormCreate(Sender: TObject);
  13. private
  14. public
  15. RadioButton1: TDemoRadioButton;
  16. RadioButton2: TDemoRadioButton;
  17. end;
  18. var
  19. MainForm: TMainForm;
  20. implementation
  21. {$R *.lfm}
  22. { TMainForm }
  23. procedure TMainForm.MainFormCreate(Sender: TObject);
  24. begin
  25. Div1.Style:='min-width: 200px; min-height: 50px; font-size: 15px;';
  26. RadioButton1:=TDemoRadioButton.Create(Self);
  27. with RadioButton1 do begin
  28. Name:='RadioButton1';
  29. Caption:='First';
  30. Parent:=Div1;
  31. end;
  32. RadioButton2:=TDemoRadioButton.Create(Self);
  33. with RadioButton2 do begin
  34. Name:='RadioButton2';
  35. Caption:='Second';
  36. Parent:=Div1;
  37. end;
  38. end;
  39. end.