Discussions related to Visual Prolog
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Can I select a file with preview?

Post by Ferenc Nagy »

Office allows to ask for preview in the file open dialog.
Is it possible from VIP common dialogs?
You do not have the required permissions to view the files attached to this post.
TIA, Regards,
Frank Nagy
User avatar
Thomas Linder Puls
VIP Member
Posts: 1466
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls »

Yes.
Regards Thomas Linder Puls
PDC
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Post by Ferenc Nagy »

How?
TIA, Regards,
Frank Nagy
User avatar
Thomas Linder Puls
VIP Member
Posts: 1466
Joined: 28 Feb 2000 0:01

Post 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.
Regards Thomas Linder Puls
PDC
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Windows 7 provides the preview button

Post 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.
You do not have the required permissions to view the files attached to this post.
TIA, Regards,
Frank Nagy