Page 1 of 1

Can I select a file with preview?

Posted: 30 Apr 2014 11:41
by Ferenc Nagy
Office allows to ask for preview in the file open dialog.
Is it possible from VIP common dialogs?

Posted: 1 May 2014 16:11
by Thomas Linder Puls
Yes.

Posted: 2 May 2014 15:35
by Ferenc Nagy
How?

Posted: 2 May 2014 20:41
by Thomas Linder Puls
Well, the editor example does it like this:

Code: Select all

predicates     onFileOpen : window::menuItemListener. clauses     onFileOpen(_Source, _MenuTag):-         FileName = vpiCommonDialogs::getFileName("*.*",["All files","*.*"],"Open text file", [],"",_),         !,         _ = editorForm::display(This, FileName).     onFileOpen(_Source, _MenuTag).
Whether there is preview or not is controlled by the user.

Windows 7 provides the preview button

Posted: 3 May 2014 11:28
by Ferenc Nagy
Thomas,
Your code sample displays the Editor Package having its full power.
Windows 7 provides the preview button near to the upper right corner of the file selection dialog.
This button shows the preview - for certain kinds of files.

I beg your pardon for asking a question about a service of the operation system.