안녕하십니까? if SaveDialog.Execute then begin ... end; 했을 시에 열려있는 SaveDialog 창의 FileName 부분이 비어 있습니다. Filter 에 따른 저장되는 파일명이 표시할려면 어떻게 하면 되는 답변 부탁드립니다. 감사드립니다..
test
•
2001.11.10 04:05
FilterIndex 사용해보세요 ..
procedure TForm1.Button1Click(Sender: TObject);
var
I: int...
FilterIndex 사용해보세요 ..
procedure TForm1.Button1Click(Sender: TObject);
var
I: integer;
F: TextFile;
FirstLine: string;
begin
OpenDialog1.Options := [ofAllowMultiSelect, ofFileMustExist];
OpenDialog1.Filter := 'Text files (*.txt)|*.txt|All files (*.*)|*.*';
OpenDialog1.FilterIndex := 2; { start the dialog showing all files }
if OpenDialog1.Execute then
with OpenDialog1.Files do
for I := 0 to Count - 1 do
begin
AssignFile(F, Strings[I]); { next file in Files property }
Reset(F);
Readln(F, FirstLine); { Read the first line out of the file }
Memo1.Lines.Append(FirstLine); { Add the line to the memo }
CloseFile(F);
end;
end;
이재현 wrote:
> 안녕하십니까?
>
> if SaveDialog.Execute then begin
> ...
> end;
>
> 했을 시에 열려있는 SaveDialog 창의 FileName 부분이 비어 있습니다.
> Filter 에 따른 저장되는 파일명이 표시할려면 어떻게 하면 되는 답변 부탁드립니다.
>
> 감사드립니다..