save TrvActionSave

Properties   Methods   Events

<< Click to display table of contents >>

save TrvActionSave

Properties   Methods   Events

TrvActionSave is the action for "File | Save" command.

Unit RichViewActions;


TrvActionSave = class(TrvAction)



This action saves the document from TCustomRichViewEdit to a file. In addition, this action maintains a list of all documents (TCustomRichViewEdits associated with their file names and formats).

If the document has a temporal name (assigned after executing TrvActionNew action), this action executes TrvActionSaveAs action. So, if you use this action, you must also use TrvActionSaveAs action. The link between the actions may be defined explicitly (via ActionSaveAs property) or implicitly (this action finds and uses TrvActionSaveAs action placed on the same form/datamodule).

If the document has a permanent name and format (assigned after executing TrvActionOpen or TrvActionSaveAs action), the action just saves the file.

If the file cannot be saved, an error message is displayed.


CanCloseDoc method should be used in Form.OnCloseQuery event.