forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@filedlg()

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
VisorSoft
Guest





PostPosted: Mon Aug 12, 2002 9:37 pm    Post subject: @filedlg() Reply with quote

How can I make a file dialog that would list two types of files, such as HTML and HTM at the same time?

Question

Thanks!

P.S.: Right now I have:
Code:
%%b1 = @filedlg("HTML File (*.html)|*.html|All Files (*.*)|*.*",Browse for file...)
Back to top
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 9:41 pm    Post subject: Reply with quote

Something like this will work:

Code:

  dialog create,Dummy
  %%file = @filedlg("HTML files|*.htm;*.html",Open file)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
VisorSoft
Guest





PostPosted: Mon Aug 12, 2002 9:43 pm    Post subject: Reply with quote

Thanks...
I can't believe how obvious that was! Embarassed
I had been trying to do that with commas, but it never occurred to me to use semicolons...
Back to top
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Aug 12, 2002 9:45 pm    Post subject: Reply with quote

I didn't know you could do that..another one for the undocumented features post?
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 9:49 pm    Post subject: Reply with quote

Yup, I think it's undocumented in the VDS helpfile. I think it's just a standard feature of Delphi.

Quote:

To create file masks in program code, assign a value to the Filter property that consists of a description and a mask separated by a vertical bar (pipe) character. Do not include spaces around the vertical bar. For example,

OpenDialog1.Filter := 'Text files (*.txt)|*.TXT';

Multiple filters should be separated by vertical bars. For example,

OpenDialog1.Filter := 'Text files (*.txt)|*.TXT|Pascal files (*.pas)|*.PAS';

To include multiple masks in a single filter, separate the masks with semicolons. This works both in the Object Inspector and in program code. For example,

OpenDialog1.Filter := 'Pascal files|*.PAS;*.DPK;*.DPR';

If no value is assigned to Filter, the dialog displays all file types.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 10:11 pm    Post subject: Reply with quote

Nice one Tommy, Wink

Does that mean there could be other Delphi features
that are "carried over" into VDS?

Maybe we need a Delphi detective.... 8O

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Aug 13, 2002 12:38 am    Post subject: Reply with quote

I guess you can learn and know a lot more about VDS if you know Delphi...I wonder just how many undocumented features there are that come from Delphi... Exclamation
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Tue Aug 13, 2002 12:58 pm    Post subject: Reply with quote

Very cool Tommy, I will be using that today. Thanks!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group