TRichView 20.5.1 - demos for Androids, text search, line highlight

News about TRichView, ScaleRichView, ReportWorkshop, RVMedia
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

TRichView 20.5.1 - demos for Androids, text search, line highlight

Post by Sergey Tkachenko »

We've uploaded new versions of our components: TRichView 20.5.1.

Trial versions are available here: https://www.trichview.com/download/

New in this version:
  • All applicable demo projects are ported to Android (FireMonkey)
  • Using platform spelling checking service (FireMonkey)
  • Adding live spelling suggestions in a popup menu (FireMonkey)
  • Improved "SmartPopup" buttons (FireMonkey)
  • Text search without selecting results is improved
  • Custom drawing of the current line
In this version, the VCL trial version uses the same trial protection as the FireMonkey version: document is "watermarked" when displayed and printed. Previously, it displayed a red floating label that could be too annoying.

The setups wizards were updated (both the main setup and IDE installer) to use modern UI.


Previous version:
viewtopic.php?t=11146
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

FireMonkey Demo projects

Post by Sergey Tkachenko »

FireMonkey Demo projects

In the previous update of TRichView, we ported to Android only Tutorial, "Editors\Editor 1" and "Editors\Editor 2\" demos.
In this update, the rest of demo projects has been ported.

Image

Main changes:
  • responsive UI design to fit both desktop and mobile screens
  • using non-modal dialogs in Android
  • using special functions to choose files instead of TOpenDialog and TSaveDialog in Android
  • replacing menus (usually with TPopup containing TListBox).
However, many demo projects were redesigned completely. For example, "Assorted\Search and Replace" demo allows searching using toolbars, "Assorted\Fields\MailMerge*\" demos have a template editor and a result generator combined in a single application.

There is a topic with additional information about ported demo projects (including videos and screenshots): viewtopic.php?t=11205
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Live Spelling Checking in FireMonkey

Post by Sergey Tkachenko »

Live Spelling Checking in FireMonkey

Like VCL/LCL version, FireMonkey version of TRichView editor can check spelling in a background thread and mark misspelled words with special red underlines. Words are checked using third-party components in OnSpellingCheck event.

In this update, TRichViewEdit offers one more option: using a spelling checking service provided by the current platform. Currently, FireMonkey implements this service for macOS. To activate this feature, assign TRichViewEdit.CheckSpelling = True. With a platform service, you do not need to assign any events, everything works automatically.

Ok, misspelled words are found and marked, how to correct them?

Suggestions for correction of the current misspelled word can be added to a popup menu. If your editor uses the standard popup menu (when PopupMenu property is not assigned), suggestions are added automatically. If you use a custom popup menu, you can use AddSpellingMenuItems to add suggestions to your menu.

If you use a third-party spelling checker, you can assign OnGetSpellingSuggestions to provide information for adding spelling menu items.
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Improved smart popup buttons

Post by Sergey Tkachenko »

Improved smart popup buttons

"SmartPopup" buttons can be shown in the editor under the specified conditions. In VCL/LCL version, you can either assign PopupMenu to this button, or process a click on this button.

Improvements in this update of FireMonkey version:
  • FireMonkey for Android does not support TPopupMenu. So, for Android, TRichViewEdit automatically creates and uses a TPopup component that offers the same options as PopupMenu. Text, images, checks are supported.
  • you can assign Popup to a "SmartPopup" button
  • a glow effect is used to display a shadow
This screenshot shows a popup created from TPopupMenu:
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Text search without selecting

Post by Sergey Tkachenko »

Text search without selecting

By default, when you call SearchText method, it selects the found text.
It may be undesirable, because selection requires a formatted document (and you do not want to display a document and want to skip a formatting step for efficiency), and TRVReportHelper component does not support selection.
You can use OnTextFound event to prevent selection.

It was implemented in older versions of TRichView. But how to continue search from the last found results without selecting them?
The new version offers this option using StoreSearchResult method.

This feature is used in the updated wrapper for ReportBuilder to highlight search results in a report preview: viewtopic.php?t=11225
Internally TppRichView object uses TRVReportHelper component, and text is searched in this component.
SearchInReportBuilder.png
SearchInReportBuilder.png (119.39 KiB) Viewed 42190 times
Sergey Tkachenko
Site Admin
Posts: 17521
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Event to highlight the current line

Post by Sergey Tkachenko »

Event to highlight the current line

One more custom drawing event is added: OnDrawCurrentLine.

CurrentLineHighlight.png
CurrentLineHighlight.png (53.52 KiB) Viewed 42185 times
Post Reply