Data in header

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
leroy
Posts: 3
Joined: Tue Mar 04, 2014 9:47 am

Data in header

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
leroy
Posts: 3
Joined: Tue Mar 04, 2014 9:47 am

Thanks

Post by leroy »

Thanks a lot

Loris
Post Reply