Page 2 of 2

Posted: Mon Jan 17, 2011 6:32 pm
by Ceprotec
Thank you very much!! :D

just one more question:

I use this command to insert variables:
SRichViewEdit1.RichViewEdit.CurTextStyleNo: = 6;
SRichViewEdit1.RichViewEdit.InsertText ('{name} ', False);
SRichViewEdit1.RichViewEdit.SetFocus;

6 The style is to be locked in variable text and will not change.
but when the text is changed, ie, the variable receives its value, the text remains locked. I tried using RVStyle1.ResetTextStyles, but stayed with letters, fonts, colors, very different. The same way I have the style 6, would like to format all text to the style of 0, which would normal text. how to do this?

Posted: Mon Jan 17, 2011 7:55 pm
by Sergey Tkachenko
You can call this procedure to remove all protection:

Code: Select all

for i := 0 to SRichViewEdit1.RichViewEdit.Style.TextStyles.Count-1 do
  SRichViewEdit1.RichViewEdit.Style.TextStyles[i].Protection := [];

Posted: Tue Jan 18, 2011 11:53 am
by Ceprotec
Very Nice!!

Thank you Sergey :D

Posted: Tue Jan 18, 2011 5:27 pm
by Ceprotec
The code you gave me using:

FillFields (SRichViewEdit1.RichViewEdit.RVData, SRichViewEdit1, 1);
SRichViewEdit1.Format;

worked just fine. but it does not alter the header or the footer. I used then:

FillFields (SRichViewEdit1.RVFooter.RVData, SRichViewEdit1, 1);
SRichViewEdit1.Format;

and

FillFields (SRichViewEdit1.RVHeader.RVData, SRichViewEdit1, 1);
SRichViewEdit1.Format;

but the error: List index out of bouds (61).
this line: "if RVData.GetItemStyle (i) = rvsTable then begin"

There are how to resolve this so they can change the variables of the header and footer?

Posted: Tue Jan 18, 2011 8:41 pm
by Sergey Tkachenko
For RVHeader and RVFooter, use your old version of FillFields.

Posted: Wed Jan 19, 2011 11:23 am
by Ceprotec
ok, I can use FillFields old. But it would have somehow to get the headers of the pages to be independent? as if a page had a headline and I could change the header on page 2 without changing the first. as if making a break header?

Posted: Wed Jan 19, 2011 3:15 pm
by Sergey Tkachenko
Unfortunately, the current version of TSRichViewEdit does not support different headers/footers for different pages.

Posted: Wed Jan 19, 2011 7:25 pm
by Ceprotec
ok Sergey, thank you :D