Page 1 of 1

[ScaleRichView][Demo] DB ScaleRichView

Posted: Fri Jun 15, 2018 8:03 am
by Sergey Tkachenko
This demo shows how to use TDBSRichViewEdit.
This is a WYSIWYG text processor application which edits documents in a database.

Download: https://www.trichview.com/support/files ... ontest.zip
DB-SRichViewEdit.png
DB-SRichViewEdit.png (196.57 KiB) Viewed 77594 times
This demo is based on the ScaleRichView\Demos\ActionTestTabs\ demo.
Changes:
- TSRichViewEdit is replaced by TDBSRichViewEdit;
- TDBEdit is added (to edit a title field);
- TDBNavigator is added;
- tabs are removed, only one document can be edited at the same time;
- file-related actions (Open, Save, SaveAs) are removed; TrvActionNew is used in a hidden mode (to reset properties of new documents)

This demo uses FireDAC and InterBase database (created in InterBase 2017) but can be easily modified to use other DB access components.

New code is at the end of the main form's unit:
- DataSource1.OnDataChange to display the current record in the status bar;
- DBSRichViewEdit1.OnNewDocument to reset properties of new documents;
- FDTable1.AfterScroll to update rulers after switching records.