123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- unit CheckerMemoFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls;
- type
- TCheckerMemoForm = class(TForm)
- lblMemo: TLabel;
- mmMemo: TMemo;
- btnPost: TButton;
- btnCancel: TButton;
- lblHint: TLabel;
- private
- function GetMemo: string;
- { Private declarations }
- public
- { Public declarations }
- property Memo: string read GetMemo;
- // 0 ÉóºË²»Í¨¹ý£»1 ÉóºËͨ¹ý
- procedure Init(AHint: string; AType: Integer);
- end;
- implementation
- {$R *.dfm}
- { TCheckerMemoForm }
- function TCheckerMemoForm.GetMemo: string;
- begin
- Result := mmMemo.Text;
- end;
- procedure TCheckerMemoForm.Init(AHint: string; AType: Integer);
- begin
- if AType = 0 then
- begin
- lblHint.Font.Color := clRed;
- end
- else if AType = 1 then
- begin
- lblHint.Font.Color := clGreen;
- end;
- lblHint.Caption := AHint;
- lblHint.Update;
- end;
- end.
|