TrvActionNew.Reset

Top  Previous  Next

Resets properties of rve.

procedure Reset(rve: TCustomRichViewEdit);

This method performs almost the same operation as this action when it is executed: it assigns default values to properties of rve; if style templates are used, it applies StyleTemplates.

This method:

does not clear rve;

does not delete unused styles (if style templates are not used, otherwise all old styles are deleted when StyleTemplates are applied);

(the most important) does not associate any file with rve.

Normally, you do not need to call this method, because all necessary operations are performed when the action is executed.

However, this method is useful if you work with TDBRichViewEdit or TDBSRichViewEdit. For db-controls, you cannot use file-based actions (TrvActionNew, TrvActionSave, TrvActionSaveAs, TrvActionOpen) directly. However, you can place TrvActionNew of a form, clear its Shortcut (to prevent execution on Ctrl+N), and call rvActionNew1.Reset(DBRichViewEdit1) in DBRichViewEdit1.OnNewDocument event.


RichViewActions © trichview.com