|
빌더 헬프의 내용입니다.
This example requires a TRichEdit and a TButton. Leave the default text, usually "RichEdit1", in the lines property. The DefAttributes will apply to this text.
//전체
void __fastcall TForm1::FormCreate(TObject *Sender)
{
RichEdit1->DefAttributes->Color = clBlue;
RichEdit1->DefAttributes->Style =
RichEdit1->DefAttributes->Style << fsBold << fsItalic;
}
//선택된 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. ");
}
.끝.
전재득 님이 쓰신 글 :
: 텍스트 에디터를 만들고 있는데요...
:
: RichEdit 를 사용해서 특정한 위치의 문자의 색이나 크기 등을 변경하고
:
: 파일로 저장해서 처음 작성시와 똑같은 색과 크기로 출력하고 싶은데요...
:
: 방법이 없을까요? Font 값은 전체가 아니라 개별적인 것이겠죠 --;
:
:
|