UFRMMemoText.pas 786 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. unit UFRMMemoText;
  2. interface
  3. uses
  4. {$IFnDEF FPC}
  5. Windows,
  6. {$ELSE}
  7. LCLIntf, LCLType, LMessages,
  8. {$ENDIF}
  9. Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  10. Dialogs, StdCtrls, Buttons, ExtCtrls;
  11. type
  12. TFRMMemoText = class(TForm)
  13. pnlBottom: TPanel;
  14. Memo: TMemo;
  15. bbCancel: TBitBtn;
  16. procedure FormCreate(Sender: TObject);
  17. private
  18. { Private declarations }
  19. public
  20. { Public declarations }
  21. Procedure InitData(const Title : String; const text : String);
  22. end;
  23. implementation
  24. {$IFnDEF FPC}
  25. {$R *.dfm}
  26. {$ELSE}
  27. {$R *.lfm}
  28. {$ENDIF}
  29. procedure TFRMMemoText.FormCreate(Sender: TObject);
  30. begin
  31. Memo.Clear;
  32. end;
  33. procedure TFRMMemoText.InitData(const Title, text: String);
  34. begin
  35. Caption := Title;
  36. Memo.Lines.Text := text;
  37. end;
  38. end.