Page 1 of 1

Data in header

Posted: Tue Mar 04, 2014 9:58 am
by leroy
When I write this

SRichViewEd.RVHeader.Clear;
SRichViewEd.RVHeader.Style:=RVStyle;
SRichViewEd.RVHeader.InsertTextW(PROP_BUSINESS_YEAR_AND_PERIOD+ #13#10,false);
SRichViewEd.RVHeader.AddBreak;
SRichViewEd.RVHeader.AddTextBlockNLA('PROP_BUSINESS_YEAR_AND_PERIOD',1,1);
SRichViewEd.RVHeader.Repaint;

only this appears:

Business:My 01.01.2014-31.12.2014

So when i click in the header und press the enter, all the text appears

Business:My 01.01.2014-31.12.2014

PROP_BUSINESS_YEAR_AND_PERIOD


How can I do, that show them all without clicking in the header?

Thanks,

Leroy

Posted: Tue Mar 04, 2014 10:05 am
by Sergey Tkachenko
You use both an editing-style method (InsertTextW) and viewer-style methods (AddTextBlockNLA and AddBreak).

Viewer-style methods require reformatting, call
SRichViewEd.RVHeader.Format instead of Repaint.

InsertTextW should not be used for document generation (this is an undoable method, and calling viewer-style methods after editing-style methods damage undo buffer). Change InsertTextW to Add*** method.

Also, do not assign RVHeader.Style directly; assign ExternalRVStyleHeader property instead.

Thanks

Posted: Tue Mar 04, 2014 11:54 am
by leroy
Thanks a lot

Loris