Article View: borland.public.cppbuilder.nativeapi
Article #3198Re: List Files
From: Thorsten Kettner
Date: Fri, 28 Jul 2006 07:12
Date: Fri, 28 Jul 2006 07:12
24 lines
1732 bytes
1732 bytes
"Renan" <gulbrrs@gmail.com> wrote:
>I think this question is an API (but I'm not sure).
>I want to select some files(in a treeview, for example) and
>rename them. I know how to rename, but I don't know how to
>select them. I want to select 30 files, and put each file in a
>separated editbox.
>All files are going to be in the same directory.
You can use VCL for that: Place a TOpenDialog on your form, set
its Option ofAllowMultiSelect, place a TStringGrid on the form,
too and do as follows:
if(OpenDialog1->Execute())
{
StringGrid1->RowCount = OpenDialog1->Files->Count;
StringGrid1->Cols[0] = OpenDialog1->Files;
}
Then let the user rename the files. (Or do you want to rename
them by an algorithm? Then you wouldn't even need the grid).
If you want to display filenames without paths in the grid, look
for ExtractFileName().
Technical Details
Message-ID:
<44c9b8d0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44c97103$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fe8a549e850bf32c X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Thorsten Kettner" <ANSWERBYthorsten.kettner@otto.de> Sender: "Thorsten Kettner" <ANSWERBYthorsten.kettner@otto.de> Reply-To: "Thorsten Kettner" <ANSWERBYthorsten.kettner@otto.de> Subject: Re: List Files Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 80.85.196.94 References: <44c97103$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <44c9b8d0$1@newsgroups.borland.com> Date: 28 Jul 2006 00:12:16 -0700 X-Trace: newsgroups.borland.com 1154070736 207.105.83.66 (28 Jul 2006 00:12:16 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail