New after version 17
|Top Previous Next|
This topic includes changes of v17.2.
▪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.
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)
▪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.
▪GetCurrentCharacter may return more than one characters, if they assemble a single glyph;
▪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