| View previous topic :: View next topic |
| Author |
Message |
VisorSoft Guest
|
Posted: Mon Aug 12, 2002 9:37 pm Post subject: @filedlg() |
|
|
How can I make a file dialog that would list two types of files, such as HTML and HTM at the same time?
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
|
Posted: Mon Aug 12, 2002 9:41 pm Post subject: |
|
|
Something like this will work:
| Code: |
dialog create,Dummy
%%file = @filedlg("HTML files|*.htm;*.html",Open file)
|
|
|
| Back to top |
|
 |
VisorSoft Guest
|
Posted: Mon Aug 12, 2002 9:43 pm Post subject: |
|
|
Thanks...
I can't believe how obvious that was!
I had been trying to do that with commas, but it never occurred to me to use semicolons... |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Aug 12, 2002 9:45 pm Post subject: |
|
|
I didn't know you could do that..another one for the undocumented features post? _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 12, 2002 9:49 pm Post subject: |
|
|
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 12, 2002 10:11 pm Post subject: |
|
|
Nice one Tommy,
Does that mean there could be other Delphi features
that are "carried over" into VDS?
Maybe we need a Delphi detective.... 8O
Cheers, Mac  _________________ 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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Aug 13, 2002 12:38 am Post subject: |
|
|
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...  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Tue Aug 13, 2002 12:58 pm Post subject: |
|
|
| Very cool Tommy, I will be using that today. Thanks! |
|
| Back to top |
|
 |
|