New after version 17
This topic includes changes of v17.3 and newer.
▪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.
▪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 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 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.
In OnSaveDocXExtra, with Area = rv_docxs_ParaStyle, the meaning of Obj parameter is changed (now it contains an RVData instead of a paragraph style).
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.
Controls loaded from RVF are now scaled from RVF PPI ("pixels per inch") to the actual PPI. Controls in RVF files saved by older versions of TRichView are not scaled (unless you change value of DefaultRVFPixelsPerInch), however, the actual PPI is assigned to their Font.PixelsPerInch (it may be noticable if RichViewPixelsPerInch is not equal to Screen.PixelsPerInch).
TRichView is compatible with Lazarus (32-bit and 64-bit Windows targets)
TRichView is compatible with Delphi and C++Builder 10.3 Rio.
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:
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.
A new (alternative) way to group editing operations for undo: BeginUndoGroup2..EndUndoGroup2 (or BeginUndoCustomGroup2..EndUndoCustomGroup2). These methods allow grouping operations in several table cells.
TRichView.OnReadMergeField allows reading merge fields from RTF.
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.
▪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.
▪"pixels per inch" value is now stored in RVF files; this value is used to scale loaded controls from RVF PPI to the actual PPI; you can disable scaling by assigning 0 to the additional integer property rveipcDPIScalable (but the actual PPI is still assigned to Font.PixelsPerInch of controls).
▪OnSaveDocXExtra, with Area = rv_docxs_ParaStyle, now you know the location of this paragraph in the document.
▪GetCurrentCharacter may return more than one characters, if they assemble a single glyph.