Dec 112017
FoxPro code that creates colorful pick lists for use in your programs.
File PICK10.ZIP from The Programmer’s Corner in
Category Dbase Source Code
FoxPro code that creates colorful pick lists for use in your programs.
File Name File Size Zip Size Zip Type
DEMOPICK.PRG 7031 2101 deflated
DEMOPK.PRG 7162 2164 deflated
GCFILE.DBF 14490 2964 deflated
GC_NO.IDX 1024 175 deflated
INVFILE.DBF 10359 1944 deflated
INV_NO.IDX 3072 549 deflated
JOBFILE.DBF 9574 2480 deflated
JOB_NO.IDX 2560 453 deflated
MAT.DBF 15205 3165 deflated
MAT.IDX 2560 534 deflated
MIS_LOGO.PRG 1689 637 deflated
PICK.COD 39147 12578 deflated
PICK.GEN 1063 526 deflated
PICKGC.FV 913 409 deflated
PICKINV.FV 1182 488 deflated
PICKJOB.FV 1439 506 deflated
PICKLIST.DOC 21929 7247 deflated
PICKMAIN.INC 64466 14099 deflated
PICKMAT.FV 995 441 deflated
PK_G1.PRG 15763 3931 deflated
PK_GP.PRG 18948 4798 deflated
PK_I1.PRG 21680 4960 deflated
PK_IP.PRG 24695 5815 deflated
PK_J1.PRG 23609 5158 deflated
PK_JP.PRG 26546 5999 deflated
PK_LIST.DBF 98 45 deflated
PK_LIST.IDX 1024 37 deflated
PK_M1.PRG 23517 5342 deflated
PK_MP.PRG 26196 6156 deflated
UTIL.INC 6910 2020 deflated

Download File PICK10.ZIP Here

Contents of the PICKLIST.DOC file

Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick M I S Consulting List
Pick Copyright (c) 1989 List
Pick (813) 247-5700 List
Pick List
Pick List
Pick List
Pick List
Pick List
Pick List

Archive Name : PICK10.ZIP
FoxCode Template : Pick.Gen
Language : FoxBase 2.1 & FoxPro
Doc File : PickList.Doc

Archive Files List

Pick.Gen FoxCode source
PickMain.Inc FoxCode source
Util.Inc FoxCode source
Pick.Cod FoxCode compiled code
DemoPick.Prg Prg to test call FoxBase demo Prgs
DemoPk.Prg Prg to test call FoxPro demo Prgs
PK_G1.PRG Prg generated by FoxCode (FoxBase)
PK_I1.PRG Prg generated by FoxCode (FoxBase)
PK_J1.PRG Prg generated by FoxCode (FoxBase)
PK_M1.PRG Prg generated by FoxCode (FoxBase)
PK_GP.PRG Prg generated by FoxCode (FoxPro)
PK_IP.PRG Prg generated by FoxCode (FoxPro)
PK_JP.PRG Prg generated by FoxCode (FoxPro)
PK_MP.PRG Prg generated by FoxCode (FoxPro)
InvFile.Dbf Dbf used to pick from
Mat.Dbf Dbf used to pick from
JobFile.Dbf Dbf used to pick from
GcFile.Dbf Dbf used to pick from
PickInv.Fv FoxView table
PickMat.Fv FoxView table
PickJob.Fv FoxView table
PickGc.Fv FoxView table
MIS_Logo.Prg Prg to create a demo background
PK_List.Dbf Dbf used to hold marked records
PickList.Doc The file you are looking at


PK_??.Prg are demo prgs called by DemoPick to display a colorful
pick list of the databases included in this archive. This is my
first template so there is room for improvement, but it beats
coding from scratch for each pick list. You could use a macro
substation to display your fields and make a generic pick list
program, but this type of display method is very slow. The
disadvantage using this prg is that each pick list must have its
own prg file. The compiled size is approximately 5.5K. The
advantage is that you design the window and colors, making it
very attractive. Some of the FoxCode subroutines came from
the FoxCode source supplied with FoxCode and have minor

If you find this template useful and convenient to use, a
registration of $25 would be appreciated. If you send $45 or
more you will receive, when available, the next version of the
PICKLIST Template. Please state the archive version number of the
software that you currently have. Send check or money order to:

M I S Consulting
2003 South 51st Street
Tampa, Fl. 33619

Send comments to Charles Alan Butler via Compuserve. (72251,633)

-=< FEATURES >=-

FoxView designed windows
FoxBase + 2.01 output code
FoxPro output code
FoxPro mouse support
Multiple lines per record
Color set for fields & text
Related databases
Zoom In and Out (any size in FP)
Single item selected
Search on key
Multiple items tagged
Tag / Untag ALL records
Tag / Untag Matching Records
Quantity entered to tag multiple items
Exit on ENTER
Exit on Ctrl-End
Help window
Jump (Skip) a number of records.
Space bar tags or moves cursor


1) Single Selection
2) Tag Multiple Selections
3) Tag Multiple Selections with Quantity

There are three types of pick list supported and when you
generate code with FoxView you will be prompted with a choice of
single or multi picks. Single picks generates a prg that allows
only one selection from the list via the ENTER key. Selecting
Multi Pick List will generate a second choice of Tag Records or
Quantity Entry. Quantity Entry allows the entry of quantity at
any record. The quantity is stored in the file 'PK_LIST.DBF'. The
memory field 'PK_QUAN' must be placed on the screen in the
FoxView file. (see PickMat.FV for an example) Multi picks allows
the selection of records via the SPACE key, as many as you want.
Multi Picks has a second prompt for the exit key selection. You
may exit via the ENTER key or via the CTRL END keys. Choosing the
CTRL END keys allow marking of records with both the SPACE and
the ENTER key. In multi picks the DEL key clears all marks.
In multi picks with tag only, pressing 'T' will tag all records.
Pressing Zoom will expand the window vertically to fill the
screen. Pressing ESCape in any pick list type will abort the
process. Please press the F1 key while running the demo prg for
more HELP.


Starting with PICK7.ZIP, FoxPro versions can be generated. This
version supports the mouse and extended display modes. The Zoom
command will fill the screen vertically even in extended display
modes. The mouse can be used for Up/Down Arrow, PgUp, PgDn, ESC,
Zoom, Help, and to move the highlite to a selected row. If the
pick list will allow tagged records, the mouse will tag/untag
that record. The symbols in the window border are added by the
template when you chose FoxPro as the target language. Holding
the left mouse button down longer than 0.4 seconds will result
in an auto repeat.


Pressing F1 or clicking on the bottom border of the window will
bring up a help window with the following information. The mouse
may be clicked on a line in this window to execute the command
explained on that particular line. Pressing any non-action key
or clicking on lines other than command line will return you to
the pick list window. ESCape will not abort from this window.


[ESC] Exit without selecting an item.
[Enter] Select the item pointed at by the cursor. (1)
[Enter] Mark/Unmark a record. (2,3)
[Enter] Save select items and exit. (1)
[Ctrl][End] Save select items and exit. (3)
[Space] Mark/Unmark a record. (1)
[0 - 9] Entry of quantity. (4)
[C] Clear all marks. (1,4)
[T] Tag all records. (1)
[M] Tag / Untag Matching Records
[S] Search for a key word match.
[J] Jump a number of records.
Arrows Cursor keys move the selection pointer.
[PgDn] To page bottom or to the next page.
[PgUp] To page top or to the previous page.
[Home] Display the first page.
[End] Display the last page.
[Z] Zoom window in and out.
[F1] [H] Displays this screen.

Note: 1) Tag records type of pick list only.
2) ENTER causes an exit from the pick list.
3) Ctrl-End causes an exit form the pick list.
4) Quantity entered tags a record type pick list.


These features requires that you enter the following information
into the USER field of the first index of the first database in
the FoxView table.

Examples are:

1) An index picture to be used in a GET statement.
Character - 'XXXXX' or '!!!!!'
Numeric - '99999' or '99.99'
Date - automatically set to '@D'

2) The default index value.
Character - ' '
Numeric - 0
Date - CTOD(' / / ')

3) The USER field should look like one of the following:
'XXXXX';' ';
;CTOD(' / / ');

The character entries must be in quotes and all must be
separated by semicolons.

*Note also that FoxView does not set the index type, so
you must change it to Numeric or Date. The Tag Matching
records routine depends on this information.


For those familiar with FoxView & FoxCode you will need to know
the following. The color of the box in FoxView will determine
the color that the prg uses and the color of each text object and
field header, if you use them, will determine the color displayed
by the generated prg. If you do not use the field headers for a
header line, you must remove any text from them. The color of
the listed rows is determined from the first Field color in
the FoxView table. The box object should be the first object
on the form and the user area is used as follows: Four
parameters are expected; HighLite Color, Dbf status, Index number
and field to return the value of when selected. These parameters
must be separated by semicolons. See the FoxView table included
for examples. [] or <> are not to be included in your text.

--------- USER Flag in the BOX Object -----------------------
Example: W+/R;Close;1; [Field Name] ;;PMCT;OFF-J;
1) [W+/R] will be the high lite color for the bar. If this is
omitted, the BOX Field color will be used.
2) [Close] causes the database to be Opened for use & then closed.
[Open] assumes the Dbf to be already open and Selects it.
If omitted 'Open' is assumed.
3) [1] causes the command SET ORDER TO 1 to be generated.
If no number is found, the 'SET' command is not generated.
4) [Field Name] is optional, field to get return value from,
may be 'RECNO()', default is the Key expression SYS(14,1)
;FUN-; causes a return value. RETURN
5) [] Lines Per Record, default is one
6) [PMCT] Skip menu flag
7) [OFF-J] Omit Features Flag


You are responsible for setting the field and text color for all
objects on the screen. Be aware that mixing colors within label
groups or text groups that are used within multiline records
except the header, will slow the display process. This is also
true for field groups in any case. The fastest way to set these
colors in groups is to set the first objects color via Ctrl-P.
Use F10 to change the window and then change the HUE for text
and labels or ATR for fields to match the new color code. Note
that if the color flag is left blank in the user flag, the BOX
field color will be used to set the highlite color.


You may have one or more lines per record. To tell the template
that more than one line is being used you must include a fifth
parameter in the User field. In the example below there are three
lines being used per record.

Example: W+/R;Close;1; [Field Name] ;3 ;


This template will handle more than one database if the
relations are properly entered in the FoxView table. Look at
PickInv.Fv for an example (press F9). Be sure and enter 'Open' or
'Close' as the second flag in the USER field of the BOX object.
See 'Getting Started' for more information on setting this flag.
In situations where databases and or index conditions are not in
the same state as the the main database, meaning that all are not
open or all are not closed, it is up to you to add the necessary
code to set these conditions. An example would be having a dbf
already open but without an index or the wrong index. You would
need to add the 'SET INDEX TO' code needed.


These types of pick list use the database 'PL_LIST.DBF' and index
file 'PK_LIST.IDX' to save the selected record information. The
Dbf has two fields, REC_NO and PK_QUAN, which are used as
follows. REC_NO will contain the record number of any tagged
record. Using this method means that the record pointers stored
in the REC_NO field will be invalid if you alter the record order
of the database used to pick from before using this information.
Commands that do this are PACK, SORT, and INSERT. If the pick
list allows quantities the PK_QUAN field will contain the
quantity entered by the user. If ESCape is used to exit the pick
list the database 'PK_LIST' is ZAPed to insure that it is empty.


With this type of pick list you must include the memory field
'PK_QUAN' in the FoxView table. (from the Table View, press F10
to get there from the screen view) Press [Ctrl-N] to insert a
field. Change the following:
Alias to 'M'
Field to 'PK_QUAN'
Label as needed
Type to 'N'
Width and Decimals as needed
Place to 'BELOW'
Press F10, press F3 and them use the arrow keys to place the
field in the desired location. Press [ENTER] when finished
moving. This field will then be used to display and get the
quantities from the user. The GET supports RANGE and VALID
entered into the FoxView table.

-=< MENUS IN 'PICK' >=-

The menus displayed during program generation may be set to a
default value so that they are not displayed. This makes
regenerating the program faster and the generated program will be
the same as the one generated before it. The sixth user flag is
used for this purpose. Enter the letter for a preset menu choice.

Menu 1 Menu 2 Menu 3 Menu 4
Language Menu Type Exit Key Tag Type
P = foxPro S = Single pick E = ENTER exit T = Tag only pick
B = foxBase M = Multi pick C = CTRL-END exit Q = Quantity tag

If both characters in a pair are included, the first in each pair
will take precedence. If both are missing, the menu is activated.
If 'S' is in the list menus 3 & 4 automaticaly skiped because the
ENTER key selects and exits the pick list.


You may flag fearures to be omitted from the prg being generated by
enterinh the 7th User flag as follows:


The 'OFF-' must be the first four characters & in this example the
'Clear ALL' & 'Jump' routines are omitted.

------- Omit Feature Flags ---------
J = Jump (Skip) Records
S = Search on key field
C = Clear ALL tagged records
T = Tag ALL records
M = Tag/Untag Matching Records
H = Help window

-=< STEP BY STEP >=-

For those not familiar with FoxView, here is a step by step
guide. You will need to enter text and interpret instructions on
the screen and press the Enter key from time to time but this
should be close enough. If all else fails, READ THE MANUAL...

Assuming FoxView & FoxCode are in the FoxBase directory and you
have put Pick.Cod in the TemplCod directory, move to the FoxCode
directory and proceed as follows:

You enter the text between the brackets [ ] or press key {Enter}

C:> [FoxView] {Enter}
FoxView C:> {ESC} to activate the pulldown command window
{Left Arrow} to Load Menu
{Down Arrow}
{Down Arrow} to Use Data File
* type the path & name of a valid database
{Right Arrow}
* Enter the Dbf Alias if one is needed
* Enter a valid index name if an index is to be used
* use the arrow keys to position the highlite on fields you DO
NOT want to use in the pick list, Press {Ctrl U} to delete them.
* on the remaining fields press {Ctrl T} to move the label on top
of the field. Do not worry about the 'Overlap Warning' message.
{F3} to activate the drag mode, then use the arrow keys to
position the fields side by side. Don't worry about exact
positioning on the screen. Press {Space} then edit the
labels as desired or use {Ctrl T} to remove them.
{F6} then arrow until all fields are highlited
{F3} then arrow to position the group of fields on the screen
{Enter} when done
{Ctrl B} then select a box type, use the arrow keys to locate the
upper left corner where you want it.
{F4} then use the arrow keys to size the box as desired, note
that the bottom of the box determines how many records are
displayed in the window.
* note that F3 should be used at this point to position the box
and fields to there correct position.
{Ctrl N} to create a text object, arrows to move it to the top
line of the box, enter the window title, {Enter} then {F3}
to center the title.
{Ctrl P} to select the color, use arrow keys, {Enter} when done
* do the same for the box
* also for each field label is used
** NOTE that the first field will be used to set the color for
the records display. Arrow to the fist field
{Ctrl P}
{/} to switch to the field color, then select the color you want
{F10} then arrow to BoxObject
* Note you may encounter more fields that were placed on page 2
you may enter 1 as the page number to place then on page 1 or
use {Ctrl U} to delete them.
{F7} then arrow to the top row
{Enter} to move the Box
* do the same for the TextObject(s)
* again to move the first field after the text objects
* This is how it should appear
1 BoxObject
2 TextObject
3 Field 1 this field color is used for the records color
4 Field 2

{Arrow} to the BoxObject row
{Ctrl Right Arrow}
* enter into the user area
* W+/R is the Light bar color
* [Open] if the Dbf will be open when this prg is called
* [Close] if the Dbf is to be opened by this Prg & then close the Dbf
* [1] is the index order number, it is not needed if there is only one
* [] is the name of the field for which the value
will be returned in the variable 'TARGET' when ENTER is
pressed. This may also be an expression. Ex. +
or UPPER()
* Here are some Valid Examples
W+/R;Open;2; already open, use index 2
W+/R;Open,0; already open, use the record order
W+/R;Close;; open the Dbf, use index if defined using F9
all three semicolons are required
{ESC} to activate the pulldown command window Load commands
{Up Arrow}
{Up Arrow} to Save Table
* enter the FoxView table name, be aware of the path
{Right Arrow}
* select PICK as the template to use, enter the generated prg name
* when you return to the command window
{Left Arrow}
{Left Arrow} to Disk commands
{Q} to quit

Any comments are welcome..
CAB (CIS 72251,633)

 December 11, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>