New in v3.0

<< Click to display table of contents >>

New in v3.0

Compatibility issues

Related to header and footer

Previously, TSRichViewEdit control contained only one RichViewEdit control (RichViewEdit). Now, there are three of them: RichViewEdit, RVHeader and RVFooter. All of them can be edited. All editing operations must be applied to ActiveEditor, not RichViewEdit. However, file saving and loading operations still must be called for RichViewEdit.

Before loading a file, you need to clear not only RichViewEdit, but also header and footer (loading RVF or RTF does it automatically, but loading text does not).

After loading a file, you need to format all editors:

SRichViewEdit1.RVHeader.Clear;

SRichViewEdit1.RVFooter.Clear;

SRichViewEdit1.RichViewEdit.Clear;

SRichViewEdit1.RichViewEdit.LoadRTF(FileName);

SRichViewEdit1.RVHeader.Format;

SRichViewEdit1.RVFooter.Format;

SRichViewEdit1.SetRVMargins;

(update: in newer version, you can use a simpler code:

SRichViewEdit1.Clear;

SRichViewEdit1.RichViewEdit.LoadRTF(FileName);

SRichViewEdit1.Format;

update 2: since version 6, you must use TSRichViewEdit.Clear and TSRichViewEdit.Format)

)

Alternatively, you can hide header and footer using TSRVPageProperty's HeaderVisible and FooterVisible properties.

The following events have TRichViewEdit control in Sender parameter: OnCurTextStyleChanged, OnCurParaStyleChanged, OnCaretMove (previously, it was TSRichViewEdit). Now all events of TNofifyEvent type have RichViewEdit in Sender parameter, so you can distinguish if it was called from RichViewEdit, RVHeader or RVFooter.

In the new version, ConvertRVToSRV, ConvertSRVToRV, GetCurrentLineCol methods work for ActiveEditor instead of RichViewEdit.

Formatting

A new text formatting procedure is used, so existing documents may look not exactly like before.

The following properties of TSRVViewProperty are renamed:

BoundTextPen rarr MarginsPen

BoundTextVisible rarr MarginsRectVisible

New components:

srvskinmanager TSRVSkinManager

srvtabset TSRVTabSet

srvscrollbar TSRVScrollBar

Header and footer

Two new properties of TSRichViewEdit control return TRichViewEdit controls used for editing/displaying header and footer: RVHeader, RVFooter.

ActiveEditor returns the currently edited control (see the compatibility issues above). OnChangeActiveEditor event occurs when it changed.

New properties of TSRVPageProperty:

HeaderY, FooterY

HeaderVisible, FooterVisible

New properties of TSRVViewProperty:

HeaderTitle, FooterTitle

HeaderPen, FooterPen

HeaderTitleFont, FooterTitleFont

HeaderTitleColor, FooterTitleColor

New actions

a_printquick TsrvActionQuickPrint

a_print TsrvActionPrint

a_pagesetup TsrvActionPageSetup

Other changes

New properties and methods of TSRichViewEdit:

GetPageStartItemNo

SkinManager, HScrollBarSchemeIndex, VScrollBarSchemeIndex

new optional parameter in SetRVMargins

New properties of TSRVBackgroundProperty:

TransparentColor

Headings

FindNextHeading/FindPriorHeading search for headings.

NextCurHeading/PriorCurHeading move the caret to the next/previous heading.