Arsip: open dialog

 
user image
more 13 years ago

vera

gimana caranya dapatin nama file dan direktori saja dri open dialog edit1 nama direktori sama foldernya aj; edit2 nama filenya saja tanpa folder/direktory /////////// if OpenDialog1.Execute then begin Edit2.Text := OpenDialog1.FileName; end; tpi tetep aj keluarnya direktory , folder dan nama filenya
user image
more 13 years ago

deLogic

untuk nama folder, gunakan ExtractFilePath untuk nama file, gunakan ExtractFileName

if OpenDialog1.Execute then
begin
  Edit1.Text := ExtractFilePath(OpenDialog1.FileName);
  Edit2.Text := ExtractFileName(OpenDialog1.FileName);
end;
user image
more 13 years ago

ImanD


with OpenDialog do
if Execute then
begin
  Edit1.Text:=ExtractFilePath(FileName);
  Edit2.Text:=ExtractFileName(FileName);
end;
user image
more 13 years ago

ImanD

ya.. kedualuan dech ama mas bayu, monggo mba @vera
user image
more 13 years ago

DelphiExpert

lha... tak pikir topik-e "Dialog Terbuka" wakakak...
user image
more 13 years ago

vera

udah bisa mkasih ya mas mas smuanya cma 1 lgi nih klo pake save dialog pada saaat save dialog execute di filename nya otomatis terisi *.TXT gmana yah
user image
more 13 years ago

ImanD

@vera coba properties DefaultExt isi dengan TXT
user image
more 13 years ago

vera

ga bsa mas pake defaultext
user image
more 13 years ago

deLogic

@vera: kode program Anda seperti apa kok gak bisa?
user image
more 13 years ago

ImanD

@vera ahh masa, di saya bisa..... cobain sample simple ini

procedure TForm1.Button1Click(Sender: TObject);
begin
  with SaveDialog1 do
  begin
    //DefaultExt:='TXT';  <= mo di setting disini monggo atw di properties langsung juga gpp
    if Execute then
     Files.SaveToFile(FileName);
  end;
end;
more ...
  • Pages:
  • 1
  • 2
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com