Writing your own is a bit excessive.  The most logical suggestion I 
think is to simply check the file after the dialog returns, and if it is 
a file extension you do not support, then inform the user of his low IQ 
and to try again.  A user will only try it once, so it's not worth lots 
of additional programming time.

Ross.

----- Original Message ----- 
From: "Eddie Shipman" <[EMAIL PROTECTED]>
To: "Borland's Delphi Discussion List" <[email protected]>
Sent: Sunday, August 06, 2006 2:30 AM
Subject: RE: How to limit user to "filter" file extensions


Best bet is to write your own FileOpenDialog and filter the files when 
the
FileName of *.* is selected. The standard Opendialog is a wrapper for 
the
Windows Common Control and cannot be extended to do this because there 
are
no notifcation messages sent when the user enters anything in the 
FileName
edit area.

> Wayne,
> If they type (e.g.) *.* in the file name box, they get to see all 
> files
> and can then select anything.
> I need to support a few (completely different) file types which are
> processed in different ways, but I do not want to allow the user to 
> pick
> some rubbish instead.
> Ken 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to