home *** CD-ROM | disk | FTP | other *** search
- Program Example_of_The_Directory_Lister;
- {TTT 4.05}
- Uses CRT, FastTTT, DOS, KeyTTT, WinTTT, DirTTT;
-
- Var
- StartPath, Path, Mask, Chosen_File : string;
- Ch : char;
-
- begin
- ClrScr;
- GetDir(0,StartPath);
- Path := StartPath;
- Mask := '*.*';
- With D do
- begin
- Cols := 5;
- Rows := 8;
- AllowEsc := True;
- BoxType := 4;
- end;
- {Thats all you have to do! Now call the directory function. You may want
- to save the screen first in a real application}
- Chosen_File := Display_Directory(Path,Mask);
-
- GotoXy(1,22);
- If Chosen_File = #027 then
- Write('You escaped')
- else
- Write('You selected file ',Chosen_File);
- {$I-}
- ChDir(StartPath);
- WriteAT(1,24,white,black,'Run DemoTTT.exe for the main demo program');
- WriteAT(1,25,white,black,'Technojocks Turbo Toolkit v4.0');
- Ch := readkey;
- end.