Changing the DefaultFileName before rvActionNew
Posted: Tue Jan 04, 2011 4:07 pm
I would like to programmatically create a new file, and provide a default file name and directory to be proposed when the user saves the file. I can do that by changing the DefaultFileName in the ControlPanel at design time, but if I try to change it before executing the New action, my change is not used.
For example:
A better solution might be to execute the rvActionNew and then change the temporary file name just for that new document without changing the DefaultFileName for additional new documents created by the user. Can you advise the best way to do that?
For reference, I am working with the ActionTestTabsCB2010 demo with ScaleRichView.
Thanks!
For example:
Code: Select all
srvActionsResource->rvActionSaveAs1->InitialDir = "Z:\\work\\2011\\TRichViewTests\\FileStorage";
RtfEditorForm->RVAControlPanel1->DefaultFileName = "funky.rtf";
srvActionsResource->rvActionNew1->ExecuteTarget(RtfEditorForm->GetActiveEditor()->RichViewEdit);
RtfEditorForm->ShowModal();
For reference, I am working with the ActionTestTabsCB2010 demo with ScaleRichView.
Thanks!