unit fcheck;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TfrmCheck = class(TForm)
    txtDisplay: TMemo;
    lblEnter: TLabel;
    chkBold: TCheckBox;
    chkItalic: TCheckBox;
    Button1: TButton;
    procedure chkBoldClick(Sender: TObject);
    procedure chkItalicClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCheck: TfrmCheck;

implementation

{$R *.DFM}

procedure TfrmCheck.chkBoldClick(Sender: TObject);
begin
  if chkBold.Checked then
    txtDisplay.Font.Style := txtDisplay.Font.Style + [fsBold]
  else
    txtDisplay.Font.Style := txtDisplay.Font.Style - [fsBold];
end;

procedure TfrmCheck.chkItalicClick(Sender: TObject);
begin
  if chkItalic.Checked then
    txtDisplay.Font.Style := txtDisplay.Font.Style + [fsItalic]
  else
    txtDisplay.Font.Style := txtDisplay.Font.Style - [fsItalic];
end;

procedure TfrmCheck.Button1Click(Sender: TObject);
begin
  Close;
end;

end.
