rvico TRichView Reference | TDBRichViewEdit

Example: Using viewer-style methods in DBRichViewEdit

Top  Previous  Next

This example shows how to use viewerstyle viewer-style methods in DBRichViewEdit (i.e. methods, introduced in TCustomRichView).

DBRichViewEdit1 edits a field of table Table1.We want to load RTF file.

procedure TForm1.Button1Click(Sender: TObject);


  if OpenDialog1.Execute and DBRichViewEdit1.CanChange then begin







Calling CanChange has the same effect as calling Table1.Edit.

If you want to save changes in the database immediately, call Table1.Post instead of DBRichViewEdit1.Format.

This sequence of actions (CanChange - modifications - Change - Format) is required only for viewerstyle viewer-style methods.

editstyle Editing-style methods do this work automatically:

procedure TForm1.Button2Click(Sender: TObject);


  if OpenDialog1.Execute then



TRichView © trichview.com