If the user changes the directory and Opens a file, when the
OpenDialog is Executed again, it will point to the directory where the
previous file was opened, not the InitialDir even though InitalDir has
been reset.
Do I need to change something so each time the Dialog opens it points
to the InitialDir?
A couple of more questions I have about the Open and Save Dialog:
1) Is there a way to control the size of the form when it opens.
It seems to remember the size if it is resized, but is there a way to
set it?
2) Is there a way to show details instead of the list. This acts like
the size.
3) If the user changes the file type, I would like to change the
directory. Is there any way to do this?
Thanks.
Clear the FileName property.
> A couple of more questions I have about the Open and Save Dialog:
>
> 1) Is there a way to control the size of the form when it opens.
> It seems to remember the size if it is resized, but is there a way to
> set it?
Nope.
>
> 2) Is there a way to show details instead of the list. This acts like
> the size.
>
Nope.
> 3) If the user changes the file type, I would like to change the
> directory. Is there any way to do this?
You need to do this Before the dialog is displayed. You can write your own OpenDialog
very easily.
OpenDialog1.FileName := '';
Finn Tolderlund
Not sure, but it may be the initial dir when the dialog is created. Try
creating the dialog at runtime instead of design time.
>
>A couple of more questions I have about the Open and Save Dialog:
>
>1) Is there a way to control the size of the form when it opens.
>It seems to remember the size if it is resized, but is there a way to
>set it?
I think you can send a WM_SIZE message to the hwnd of the dialog. Not sure
about this
>2) Is there a way to show details instead of the list. This acts like
>the size.
Not sure
>
>3) If the user changes the file type, I would like to change the
>directory. Is there any way to do this?
Look at the events one is something like OnTypeChange.
--
Iman
"I was looking handsome,
she was looking like an erotic vulture" The Pixies
Clearing the FileName did it.
I am considering writing my own OpenDialog.
Tom
>I save InitialDir in the registry after Execute, which is used next time
>the dialog is opened.
I didn't realize the previous filename would set the directory, I almost
always create my dialogs at run time, so I've never been bothered by this.
I also use the Registry for a recent file history list.