| History | |
New in Version 1.1.3:
Compatibility with Addict Spell Check and Thesaurus v2.34 (new link).
The latest version of Addict includes a demo of using it with RichViewEdit.
Here is screenshot of this demo:
Improvements in RVF (RichView File Format)(suggested and implemented by Harley Pebley).
It's now possible to save names of text and paragraph styles instead of their indices (Delphi3+ required).
Set rvfoUseStyleNames in RichView.RVFOptions. When loading, RichView autodetects if the file was saved with indices or names.
Pluses:
- contents of a file remains synchronized with collections of styles even if you delete or insert a new style;
Minuses:
- increased file size;
- names of styles should be unique (otherwise the component uses the first occurence of styles with the given name when loading);
- files become sensitive to changing style names.
New in Version 1.1:
Delphi 5 compatibility
Some changes were made in RVSEdit.pas (a component editor for TRVStyle). Other files were installed in D5 without changes (well, almost without changes - DsgnIntf was removed from uses clause of RVStyle.pas where it was not used)
Properties and events were distributed by categories (and several new categories were added: Hypertext, Checkpoints, RVF, Import/Export, Style Name)
OnContextPopup event, introduced in D5, is now available
Better 256-color mode support
There is a new property of RichView:
property DoInPaletteMode
TRVPaletteAction = (rvpaDoNothing, rvpaAssignPallette, rvpaCreateCopies, rvpaCreateCopiesEx);
rvpaDoNothing - RichView does nothing with palette. Use if you have no pictures in RichView, or all pictures are of 16 colors. Please always set this property to this value if you are using D2 or CB1 (palette mode improvements are not available for these versions)
rvpaAssignPallette - when working in 256 colors, RichView creates a palette and assigns it to all pictures (including background).
This will affect all pictures that already in RichView, and all pictures that will be inserted later (when in 256 color mode). This is also not very good option, because pictures lose their quality, and it can't be restored when switching to highcolor/truecolor mode. Output to RVF, HTML, clipboard, printer will lose quality of pictures. So use this option if you want only
to display document.
rvpaCreateCopies (default and preferred option) - RichView will create
copies of all pictures (including background) and assign palette to them. This work is absolutely "transparent" for you, you will work with source pictures, which remain unchanged.
rvpaCreateCopiesEx - some experiment, do not use.
The palette that RichView uses is below:
Implementation of custom palettes is available on request.
NOTES:
1) if you have other controls on a form that also change palette (such as
TImage, or buttons with multicolor glyphs), you can not achieve a required
results;
2) if you use multicolor "hotspots" or "bullets" in RichView, it's
recommended to have two sets of them - 16color for 16- and 256-color modes
and multicolor for others.
3) RichView can't change palette of bitmaps inside metafiles; do not use
TMetafile with multicolor bitmaps inside in 256-color mode.
4) RichView can't update information about palette when the user switches a color
resolution without restarting Windows. Please do it yourself.
In the main form write
(in interface section)
procedure WMDisplayChange(var Message: TWMDisplayChange); message
WM_DISPLAYCHANGE;
(in implementation)
procedure TForm1.WMDisplayChange(var Message: TWMDisplayChange);
begin
// Call UpdatePaletteInfo methods of all your
// RichViews, RichViewEdits, and RVPrints (if you use print preview)
// for example:
RichViewEdit1.UpdatePaletteInfo;
RVPrint1.UpdatePaletteInfo;
end;
5) if you are creating RichViews, RichViewEdits, RVPrintPreviews, RVPrints at run-time (such as MyRichView := TRichView.Create(Self)), you need to call UpdatePaletteInfo methods of such controls after you have created them.
Hypertext in editor: activated when the user presses and holds Ctrl key!
Set rvoCtrlJumps in RichViewEdit.EditorOptions to enable this feature.
Selecting words
If you set rvoDblClickSelectsWord in RichView.Options, user will be able to select words using double click.
There are also new methods:
TRichView.SelectWordAt(X,Y: Integer) - selects word at (X,Y), where X and Y - client coordinates of point.
TRichViewEdit.SelectCurrentWord - selects word at position of caret
"Word" is characters between the characters from the Delimiters property
Two characters were added in the default value of Delimiters property - '/' and '\'.
Right click outside the selected area can now deselect (and move the caret in an editor).
... if you include rvoRClickDeselects in RichView.Options
TopMargin and BottomMargin
Like LeftMargin and RightMargin, these properties are measured in "screen" pixels. These values are added to top and bottom of every page when printing, and to top and bottom of document in RichView
You can show printable area rectangle in RVPrintPreview
MarginsPen: TPen has Style=psClear by default, so a rectangle around the document area on page is invisible. Set Style=psDot or other value to display it.
Now you can hide a vertical scrollbar in editor or chat-style application
VscrollVisible now works in TRichViewEdit and with RichView.FormatTail methods. But there is one known issue in this version: vertical scrollbar cannot be switched from invisible to visible state in editor (TRichViewEdit), if the editor contains non empty document.
Now you can define you own conversions of text styles that can be applied to the selected text
There is a new event of RichViewEdit: OnStyleConversion and a new method ApplyStyleConversion. Details will be available in the help file.
Now you can get the caret position in the editor in terms of ("item index", "offset in item")
(RichViewEdit.CurItemNo, RichViewEdit.OffsetInCurItem). OffsetInCurItem is a new property. You are still not able to get the caret position in terms of ("row","column"). Will be implemented in later versions.
Fixed: incorrect handling of Del key at the end of line under some circumstances.
Very serious bug, it can show "List index out of bounds" message, although the user can continue editing text after closing this message (places of two conditions in if were swapped to fix this problem)
Fixed: methods AddTextXXX and InsertText ignore the last CR-LF characters in inserted text, if there was no text after them
AddTextNL('Hello',0,0) adds one item now. AddTextNL('Hello'+crlf,0,0) adds two items ('Hello' and '') now. But it may be not obvious that AddTextNL(crlf+crlf+crlf,0,0) now adds not 3, but 4 items (because crlf+crlf+crlf is considered as ''+crlf+''+crlf+''+crlf+'').
const crlf:String = chr(13)+chr(10);
Two improvements what were planned in 1.1 were put off for later versions: drag&drop and protected text.
|