| View previous topic :: View next topic |
| Author |
Message |
nicolasr Guest
|
Posted: Tue Dec 23, 2003 1:43 am Post subject: Re: How to Use TOpenDialog to Open a Directory |
|
|
Hi,
as far as I know the standard open dialog doesn't support this.
The usual way to go is use the VCL SelectDirectory() function
which brings up the Shells BrowseForFolder dialog.
hth,
Nick
"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> schrieb im Newsbeitrag
news:3fe7921f$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?
Thanks !
Bruno.
|
|
|
| Back to top |
|
 |
Bruno Felipe Guest
|
Posted: Tue Dec 23, 2003 1:54 am Post subject: How to Use TOpenDialog to Open a Directory |
|
|
Hi All,
I'm working on an app that the user will choose a diretory to store the data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?
Thanks !
Bruno.
|
|
| Back to top |
|
 |
Seong Hun Jeong Guest
|
Posted: Tue Dec 23, 2003 2:01 am Post subject: Re: Use AnsiString::LastDelimiter() function...ex) OpenDialo |
|
|
Sample code....
if(OpenDialog1->Execute())
{
AnsiString FilePath =
OpenDialog1->FileName.SubString(1,OpenDialog1->FileName.LastDelimiter("\"))
;
//Use FilePath
}
"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote
| Quote: | Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?
Thanks !
Bruno.
|
|
|
| Back to top |
|
 |
Sage Honor(Jeong Seong-hu Guest
|
Posted: Tue Dec 23, 2003 3:18 am Post subject: Re: Use ExtractFilePath() Function |
|
|
hi. i am Seong hun Jeong
I find API function...
ExtractFilePath(OpenDialog1->FileName));
p.s:
ExtractFileDrive();
ExtractFileName();
ExtractFileExt();
"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote
| Quote: | Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?
Thanks !
Bruno.
|
|
|
| Back to top |
|
 |
Bruno Felipe Guest
|
Posted: Tue Dec 23, 2003 3:46 am Post subject: Re: How to Use TOpenDialog to Open a Directory |
|
|
Thanks for the help !
, and Merry Christmas!
"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote
| Quote: | Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?
Thanks !
Bruno.
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Dec 23, 2003 7:13 pm Post subject: Re: Use AnsiString::LastDelimiter() function...ex) OpenDialo |
|
|
"Seong Hun Jeong" <sage5nor (AT) chol (DOT) com> wrote
That requires the user to pick an actual file first, otherwise Execute()
will not return in the first place. That is not the same thing that Bruno
is asking for.
| Quote: | AnsiString FilePath =
OpenDialog1->FileName.SubString(1,OpenDialog1->FileName.LastDelimiter("\")) |
I guess you haven't seen the ExtractFilePath() function before:
AnsiString FilePath = ExtractFilePath(OpenDialog1->FileName);
Gambit
|
|
| Back to top |
|
 |
|