Page 1 of 1

How to define defaul File name and path before SaveAs action

Posted: Sun Aug 14, 2016 6:15 am
by max.beliy
How I can define default file name and path for showing them in
rvActionSaveAs dialog ?

Posted: Sun Aug 14, 2016 8:12 am
by Sergey Tkachenko
RVAControlPanel.DefaultFileName
If you want to change the default format as well, assign also DefaultExt and DefaultFileFormat properties

Posted: Sun Aug 14, 2016 2:59 pm
by max.beliy
It works only once at design time, but in run time changing of
RVAControlPanel.DefaultFileName doesn't work, and the file name is still same as set in design time.

Posted: Sun Aug 14, 2016 4:12 pm
by max.beliy
TrvaDocumentInfo(rvActionSave1.Documents[rvActionSave1.FindDoc(RichViewEdit1)]).FileName := ...

Posted: Sun Aug 14, 2016 4:13 pm
by Sergey Tkachenko
This property is applied every time you call RvActionNew.Execute.

Posted: Sun Aug 14, 2016 4:15 pm
by Sergey Tkachenko
Yes, if you need changing file name AFTER its assigning, you can change
rvActionSave1.GetDoc(RichViewEdit1).FileName.
It works both for default file name (assigned by New) and for exact file name (assigned by Open or SaveAs).