Dec 232017
Pop up directory info in TP4. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
SELFILE.DOC | 4812 | 1958 | deflated |
SELFILE.PAS | 24030 | 5000 | deflated |
SELFILE.TPU | 6752 | 3023 | deflated |
Download File SELFILE.ZIP Here
Contents of the SELFILE.DOC file
Selfile is a Turbo Pascal V4.0 Unit that you can include in programs you
write. It is shareware...this means that if you use it you are expected
to make a contribution, $10.00 is requested. Those who use it and do
not make a contribution will suffer the consequences in the next dimension.
To use selfile in your program include the clause:
"Uses SelFIle;"
in your program, selfile should be declared before any "Uses" references
to DOS or CRT, (i.e. USES SelFile,Dos,Crt;);
There are two basic functions defined in the selfile TPU. The first is
Sel_File itself. It will open a window and display the contents of the
file directory specified by PATH within that window. The user can then
use the arrow keys and PgUp/PgDn keys to highlight the desired file. Hitting
the return key selects the file, hitting the escape key aborts the file
selection. If there are no files matching path or if the user hits the
escape key selfile will return an empty file name. You can determine if
the user has selected a file by using a program statement like:
File_Name := Sel_File(Title,Path,Attr);
If (Length(File_Name) <> 0) Then
{ here we have a file name returned}
Else
{ here no file name was returned/selected}
Sel_File returns a string, the string declared in the calling program
should be at least a String[13], less will cause problems....
Arguments to the Sel_File function are as follows:
Title : This is a string to displayed in the upper left corner
of the boarder of the file display window.
(e.g. Title := 'Select A File';)
The lenght of the title string must be less than
the file selection window with. See description for
the procedure SetLim for more info on window widths.
Path : This is the dos path/file specifier used to search with.
(e.g. Path := 'C:\Data\*.Dat';)
Attr : This is the attribute of the files you wish to search
for, normally 0, see the TPC 4.0 manual reference for
the FindFirst function for more info.
(e.g. Attr := 0;)
Procedure SetLim allows you to define the position and size of the file
selection window. The arguments to SetLim are as follows:
RowB : Screen absolute row to begin the window at.
ColB : Screen absolute col to begin the window at.
RowQ : Number of rows of file names to display (if you
select a boarder then the actual number of rows of
file names will be 2 less).
ColQ : Number of Columns of file names can be in the
range 1 to 5.
NOT the number of screen columns in the window.
Active: Video attribute for the highlighted filename.
Inactive: Video attribute for the window and non-highlighted filenames.
boarder: Boarder type 1 = double line, 2 = single line, 3 = +- chars,
0 = no boarder.
The file Test.Pas shows the use of Sel_File and SetLim. Play around with it
to see what really happens. Also since the source code is included here
you can see for yourself what is going on.
This is the first release of this module, so there may be bugs, etc. if
you find a bug please report it. Also, I plan to add additonal functionality
and improvements as I find the time. If you have any suggestions let me know.
Even if you don't want to contribute, and you want to use it, please
register, I'd like to get an idea of how many people are using the thing and
wether or not I should spend more time on it an other modules.
This is a first cut at the documentation, so it's a little sparse. I'll
improve it as time goes by.
Finally...again...if you have any comments or questions contact me,
preferably via compuserve, either through EasyMail or on the Borland
Turbo Pascal Forum (BPROGA) or the IBM Software forum (IBMSW),
or by us mail.
Sel_File Registration Form
Name:
--------------------------------------------------
Address:
--------------------------------------------------
City:
--------------------------------------------------
State: Zip:
------- --------------------
Phone:
--------------------------------------------------
Donation:
---------------------------------------------------
Thank you for your registration and (hopefully) your donation.
You will be contacted with information of future releases products.
Mail this form to:
Repstad Computer Consultants
RFD #1, Box 3720
Sheldon, VT 05483
December 23, 2017
Add comments