PICKIT.TXT -- a short explanation for Ken Holloway's PICKLIST.PRG routine
attached. 

This function will handle creating a picklist for you, the programmer, which
will return a value from a database file. Here's a quick explanation on how
to use it:


SET LIBRARY TO PICKLIST   && this takes care of not disabling your PROCEDURE
                          && file
*-- <database> is the database you want to look in
*-- <tag>      is the tag name you want the data sorted on
*-- <area>     is the work area ... one suggestion is to use:
*--              select()   which will find the next available area
USE <database> ORDER <tag> IN <area>
cColor1 = "rg+/gb,w+/b,rg+/gb"
cColor2 = "rg+/r,rg+/n"
*-- cMemVar is where to return the value to ...
*-- Title      = A title to display at the top of the picklist
*-- Expression = Expression to display (see examples)
*-- Key        = If you use this, the system will issue a SET KEY TO
*--              rather handy to limit the data displayed on the screen
*-- nFromRow   = Upper Left Corner
*-- nFromCol   = Upper Left Corner
*-- nToRow     = Lower Right Corner
*-- nToCol     = Lower Right Corner
*-- cColor1    = Colors of Message, Title, Box
*-- cColor2    = Colors of Highlight, Selected
*--              see docs in PICKLIST.PRG itself for more details on breakdown
*--              of colors ...
*-- cMemVar = PickList("<Title>","<Expression>","<Return>","<Key>",<nFromRow>,;
*--                     <nFromCol>,<nToRow>,<nToCol>,<cColor1>,<cColor2>)
*-- Examples:
cMemVar = PickList("Client Name","NAME","JOB_CODE","",5,10,20,55)
*-- this would display a title of "Client Name", would display client's names,
*-- would return (when the user selects an item) the job_code field for that
*-- name, and has coordinates as given. It will use the default colors built
*-- in to the routine, since no colors were passed, and since no KEY was
*-- passed, the SET KEY TO option will be ignored.
cMemVar = PickList("Client Name","NAME","JOB_CODE","01",5,10,20,55)
*-- This is the same, but uses a KEY of 01, which would limit the job codes
*-- to only those starting with "01", IF your MDX tag was set to sort by job 
*-- codes. This could get weird since the column listing names would not
*-- be listed in sequence.
cMemVar = PickList("Client Name","Name+chr(29)+Job_Code","Job_Code","",;
				5,10,20,55,cColor1,cColor2)
*-- This example uses the TAB option of this list. If you insert into the
*-- expression the CHR(29) code, it will display the character 29 as part
*-- of the expression. Pressing the TAB key will change the selection to the
*-- second column of data. Pressing the <Shift><Tab> (Backtab) will go back
*-- to the first column. Note that colors were passed this time.

Hope this helps. It's a fairly slick routine. 
