RichEdit

设置字符颜色

this->RichEdit1->SelStart=2;
this->RichEdit1->SelLength=2;
this->RichEdit1->SelAttributes->Color=clRed;

 

行间距字符间距

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   PARAFORMAT2 pf;
  pf.cbSize=sizeof(PARAFORMAT2); //识别paraformat与paraformat2
  pf.dwMask=PFM_LINESPACING;
  pf.dyLineSpacing=300; //行距在此设置
  pf.bLineSpacingRule=4;

  SendMessage(RzRichEdit1->Handle,EM_SETPARAFORMAT,0,LPARAM(&pf));
  RzRichEdit1->Enabled = false;
 


  RichEdit1.SelAttributes.Name := '宋体';

}

 

posted on 2016-09-01 13:10  lypzxy  阅读(322)  评论(0编辑  收藏  举报