set the paragraph at left,center,or right
Posted: Thu May 04, 2006 2:51 pm
I want to set the paragraph at left,center,or right.but it changed must after press a Keyword or the mouse press on it.Could you get me some advice. The codes are following:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(Sender == Button1)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaLeft;
if(Sender == Button2)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaCenter;
if(Sender == Button3)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaRight;
}
Thank you!
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(Sender == Button1)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaLeft;
if(Sender == Button2)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaCenter;
if(Sender == Button3)
RVStyle1->ParaStyles->Items[RichViewEdit1->CurParaStyleNo ]->Alignment = rvaRight;
}
Thank you!