//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "DefAttributes.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: DefAttributes
// Property: ComCtrls.TCustomRichEdit.DefAttributes
// Property: ComCtrls.TCustomRichEdit.SelAttributes
// Property: ComCtrls.TTextAttributes.Color
// Property: ComCtrls.TTextAttributes.Height
// Property: ComCtrls.TTextAttributes.Style

// BeginCode
/*
This example requires a TRichEdit and two TButtons. Leave
the default text, usually "RichEdit1", in the lines
property. The DefAttributes will apply to this text.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  RichEdit1->SelAttributes->Color = clRed;
  RichEdit1->SelAttributes->Height += 5;
  RichEdit1->Lines->Add("This line of text will be red. ");
}

void __fastcall TForm1::Button2Click(TObject *Sender)
{
  RichEdit1->DefAttributes->Color = clBlue;
  RichEdit1->DefAttributes->Style =
    RichEdit1->DefAttributes->Style << fsBold << fsItalic;
}
// EndCode
// EndExample: DefAttributes
//---------------------------------------------------------------------------
