To save the file of particular type by using filenameLookupFilter method.
static void _saveFileDialog(Args _args)
{
Dialog dialog = new Dialog("Dialog name");
DialogField dialogFileName;
str fileName;
dialogFileName = dialog.addField(extendedTypeStr(FilenameSave), "Save csv file","");
dialog.filenameLookupFilter(['csv','*.csv']);
if (dialog.run())
{
fileName = dialogFileName.value();
info(fileName);
}
}
Thanks,
K. Arunsubramaniam
static void _saveFileDialog(Args _args)
{
Dialog dialog = new Dialog("Dialog name");
DialogField dialogFileName;
str fileName;
dialogFileName = dialog.addField(extendedTypeStr(FilenameSave), "Save csv file","");
dialog.filenameLookupFilter(['csv','*.csv']);
if (dialog.run())
{
fileName = dialogFileName.value();
info(fileName);
}
}
Thanks,
K. Arunsubramaniam
No comments:
Post a Comment