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?

Unread post by Ferenc Nagy »

Office allows to ask for preview in the file open dialog.
Is it possible from VIP common dialogs?
Attachments
Preview of files from MS Word
Preview of files from MS Word
preview.png (77.08 KiB) Viewed 6044 times
TIA, Regards,
Frank Nagy
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread 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

Unread post by Ferenc Nagy »

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

Unread 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

Unread 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.
Attachments
preview button.PNG
preview button.PNG (10.55 KiB) Viewed 5984 times
TIA, Regards,
Frank Nagy
Post Reply