Page 1 of 1

ApplyStyleConversion Question

Posted: Tue Jan 27, 2009 12:23 am
by DavidRM
I'm using SRVE with an external TRVE. I'm not using RVActions.

When I apply a style using ApplyStyleConversion that would change the layout for an item (say, by making the font size 1 bigger), the right margin is getting messed up. The text wraps at the edge of the page, not at the right margin.

Is there some SRVE call I should make when adding a new text or paragraph style that would address this?

Thanks.

-David

Posted: Tue Jan 27, 2009 10:36 pm
by proxy3d
Write an example how you do it? For example, it is a code at me does not cause this problem:

Code: Select all

procedure TFExternalRV.Button2Click(Sender: TObject);
begin
  SRichViewEdit1.RichViewEdit.ApplyStyleConversion(1);
  SRichViewEdit1.Format;
end;

procedure TFExternalRV.SRichViewEdit1StyleConversion(
  Sender: TSRichViewEdit; StyleNo, UserData: Integer;
  AppliedToText: Boolean; var NewStyleNo: Integer);
begin
  SRichViewEdit1.RichViewEdit.Style.TextStyles.Items[StyleNo].Size := 14;
end;

Posted: Wed Jan 28, 2009 9:31 pm
by DavidRM
I found the problem. My external TRVE had the rvoClientTextWidth option set.

Thanks.

-David