home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Tools / Developers / PEDELF32.ZIP / pedelf32 / UNITPATH.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1998-09-28  |  1.3 KB  |  59 lines

  1. unit UnitPath;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, Classes, Forms, Controls, StdCtrls, Buttons,
  7.   ExtCtrls, FileCtrl;
  8.  
  9. type
  10.   TdlgTablePath = class(TForm)
  11.     DriveComboBox1: TDriveComboBox;
  12.     DirListBox1: TDirectoryListBox;
  13.     EditDestPath: TEdit;
  14.     btnOK: TBitBtn;
  15.     btnCancel: TBitBtn;
  16.     procedure BtnOKClick(Sender: TObject);
  17.     procedure DirListBox1Change(Sender: TObject);
  18.     procedure FormShow(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. var
  26.   dlgTablePath: TdlgTablePath;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. uses SetLoc, Main;
  33.  
  34. procedure TdlgTablePath.FormShow(Sender: TObject);
  35.  
  36. begin
  37.   try
  38.     if not DirectoryExists(FrmSetLoc.editTablePath.Text) then
  39.        DirListBox1.Directory := FrmSetLoc.editTablePath.Text;
  40.   except
  41.     DirListBox1.Directory := ExtractFilePath (strpas (Main.FileNme));
  42.   end;
  43.   editDestPath.Text := DirListBox1.Directory;
  44. end;
  45.  
  46. procedure TdlgTablePath.DirListBox1Change(Sender: TObject);
  47. begin
  48.   editDestPath.Text := DirListBox1.Directory;
  49. end;
  50.  
  51. procedure TdlgTablePath.BtnOKClick(Sender: TObject);
  52. begin
  53.   frmSetLoc.editTablePath.Text := DirListBox1.Directory;
  54.   frmSetLoc.editTablePath.SetFocus;
  55.   frmSetLoc.editTablePath.SelectAll;
  56. end;
  57.  
  58. end.
  59.