Re: OpenDialog



Stark wrote:
I want my user to choose a file in a folder among those staring with some characters in their name. I do this using the filter property. This does not avoid the user entering a totally different filename in the filename edit. How can I avoid this ? Can I disable the filename edit ? Or is there another solution ?

You could just validate the user's choice of filename after they close the dialog.

Or if the user can choose files only from a certain folder as well, there's no point in giving them the full functionality of an open dialog. Create your own dialog, plonk a TFileListBox on it, and set the mask and directory of it.

Cheers,
Nicholas Sherlock
-----------------
www.Newsgroup-Binaries.com - *Completion*Retention*Speed*
Access your favorite newsgroups from home or on the road
-----------------
.



Relevant Pages

  • Re: OpenDialog
    ... I do this using the filter property. ... This does not avoid the user entering a totally different filename in the filename edit. ...
    (comp.lang.pascal.delphi.misc)
  • Re: OpenDialog
    ... I do this using the filter property. ... This does not avoid the user entering a totally different filename in the filename edit. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Unable opening a file, when filename + path are very long
    ... The only thing to avoid this is, teach your users to save the content in the file and not in the name of the file. ... But still with shorter names you came in trouble, ... After I renamed the filename to something shorter, ... I assume this has something to do with a bad namingpolicy an more ...
    (microsoft.public.win2000.security)
  • Re: download counter?
    ... create table counter (filename varchar(100), ... Better then redirecting is to read file in php script, send to browser and write to sql table after a file is complete send. ... This avoid a situation when user cancel download. ...
    (comp.lang.php)
  • Re: OpenDialog
    ... This does not avoid the user entering a totally different filename in the filename edit. ... If you want to continue using that control, ...
    (comp.lang.pascal.delphi.misc)