New after version 17

New after version 17

Top  Previous  Next

This topic includes changes starting from version 17.2.

Compatibility issues

Methods for compatibility with ancient versions of TRichView are removed.

Redundant TRichView.Add*** methods are marked as deprecated. Only a single method for each item type is recommended. These methods have optional parameters. For example, use AddBreak instead of AddBreakEx, AddBreakTag, AddBreakExTag.

All String, TRVRawByteString, TRVAnsiString properties and parameters of methods and events are changed to TRVUnicodeString, where it is possible.

Changed events:

In TRichView: OnAssignImageFileName, OnImportPicture, OnItemAction, OnItemHint, OnReadHyperlink, OnRVDblClick, OnRVRightClick, OnRVFControlNeeded, OnRVFPictureNeeded, OnSaveComponentToFile, OnSaveDocXExtra, OnSaveHTMLExtra, OnSaveImage2, OnSaveItemToFile (additionally, Unicode: Boolean parameter is removed), OnSaveParaToHTML, OnSaveRTFExtra, OnSpellingCheck, OnWriteHyperlink

In TRichViewEdit: OnDropFile, OnItemTextEdit

In TRVStyle: OnDrawStyleText (see also below)

A new PSaD parameter is added to custom drawing events of TRVStyle component. Additionally, since this version, text is drawn relative to its base line. These change may affect your existing custom drawing code. Also, parameters are added to:

In TRVStyle: OnDrawStyleText (Baseline and PSaD), OnApplyStyle (PSaD)

In TFontInfo: Draw (Baseline and PSaD)

If you used these events in your application, you need to change types of parameters manually. Since TRVUnicodeString is defined in RVTypes unit, make sure that this unit is listed in "uses" of your forms.

Many var-parameters of methods were changed to out-parameters. This change should not affect your projects unless you developed classes inherited from TRichView classes.

Lazarus

TRichView is compatible with Lazarus (32-bit and 64-bit Windows targets)

Unicode

Since this version, all text is stored in our components as Unicode, for all versions of Delphi. All string properties and parameters are made Unicode, when possible.

Because of this change, some properties became obsolete. They are not removed, but do nothing:

TFontInfo.Unicode

TRVStyle.DefUnicodeStyle

TRVRTFReaderProperties.UnicodeMode

New features related to Unicode:

support for Unicode characters having codes greater than $FFFF

support for pasting and drag&dropping of Unicode URLs

entering a character by pressing and holding  Alt  and typing decimal character code on the numeric keypad, starting from '0' ( Num Lock  must be on); this feature can be turned off, if you include rvoAlt0CodesUseKeyboardCodepage in EditorOptions

entering a character by typing its hexadecimal code (directly in the editor) and them pressing  Alt  +  X . Pressing  Alt  +  X  again converts it back to a hexadecimal number.

Editing

A new (alternative) way to group editing operations for undo: BeginUndoGroup2..EndUndoGroup2 (or BeginUndoCustomGroup2..EndUndoCustomGroup2). These methods allow grouping operations in several table cells.

New events

TRichView.OnReadMergeField allows reading merge fields from RTF.

Text drawing

All text is drawn relative to its base line. Previously, by default, it was drawn relative to its top left corner. New drawing produces better result for scaled text (in TRVPrintPreview or in ScaleRichView). This change affected TRVStyle.OnDrawStyleText event and TFontInfo.Draw method, see the compatibility issues above.

Other features

GetCurrentCharacter may return more than one characters, if they assemble a single glyph;

in OnSaveDocXExtra, with Area = rv_docxs_ParaStyle in

loading graphic from RVF even if the specified graphic class is not available (or not registered): the proper graphic class is chosen by the graphic content. New option for RichView.RVFOptions: rvfoIgnoreGraphicClasses, it allows ignoring names of graphic classes specified in RVF.


TRichView © trichview.com