trichview.support
Re: Apply Textstyle to paragraph |
Author |
Message |
Dirk Bozza |
Posted: 01/16/2003 14:06:35 Thank You!!! "Yernar" <yernar@mail.ru> wrote: > >Smth like this: > >procedure TParaForm.ChangeButtonClick(Sender: TObject); >var > CurNo: Integer; > StartNo, EndNo: Integer; > Offs, Offs2: Integer; > function StartPara(No: Integer): Integer; > var > I: Integer; > begin > for I:=No downto 0 do > if rve.IsParaStart(I) then Break; > Result:=I; > end; > function EndPara(No: Integer): Integer; > var > I: Integer; > begin > for I:=No to rve.ItemCount-1 do > if rve.IsParaStart(I) then Break; > Result:=I; > end; >begin > CurNo:=rve.CurItemNo; > StartNo:=StartPara(CurNo); > Offs:=rve.GetOffsAfterItem(StartNo); > EndNo:=EndPara(CurNo); > Offs2:=rve.GetOffsBeforeItem(EndNo); > rve.SetSelectionBounds(StartNo, Offs, EndNo, Offs2); > rve.ApplyTextStyle(1); >end; |
Powered by ABC Amber Outlook Express Converter