Page 1 of 1

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

Posted: Mon Oct 31, 2022 10:48 am
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

FireMonkey Demo projects

Posted: Mon Oct 31, 2022 10:56 am
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

Live Spelling Checking in FireMonkey

Posted: Mon Oct 31, 2022 11:09 am
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.

Improved smart popup buttons

Posted: Mon Oct 31, 2022 11:19 am
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:

Text search without selecting

Posted: Mon Oct 31, 2022 11:25 am
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 23347 times

Event to highlight the current line

Posted: Mon Oct 31, 2022 11:29 am
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 23342 times