Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : FPICKER.ZIP
Filename : PICKLIST.PRG

 
Output of file : PICKLIST.PRG contained in archive : FPICKER.ZIP
* ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
* º º
* º 02/12/92 PICKLIST.PRG 10:38:54 º
* º º
* ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
* º º
* º Scott D. Grabo º
* º º
* º Copyright (c) 1992 º
* º Administrative Office of the U.S. Courts º
* º 1726 M Street NW º
* º Washington, DC 20544 º
* º º
* º Description: º
* º This program was automatically generated by GENSCRN. º
* º º
* ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ


* ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
* º º
* º PICKLIST Setup Code - SECTION 1 º
* º º
* ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*

#REGION 1
PARAMETER src_array, tgt_array, win_title, keepit, sourcename, ;
targetname, sort_order

PUSH MENU _MSYSMENU

*
* Needed to supress project build errors only
EXTERNAL ARRAY tgt_array, src_array

IF NOT TYPE("m.win_title") = "C" OR EMPTY("m.win_title")
*
* Default dialog box title
STORE "" TO m.win_title
ELSE
STORE " " + m.win_title + " " TO m.win_title
ENDIF

IF NOT TYPE("m.sourcename") = "C" OR EMPTY("m.sourcename")
STORE "Available" TO m.sourcename
ENDIF

IF NOT TYPE("m.targetname") = "C" OR EMPTY("m.targetname")
STORE "Selected" TO m.targetname
ENDIF

IF NOT TYPE("m.sort_order") = "N" OR m.sort_order = 0
STORE 1 TO m.sort_order
ENDIF


#REGION 0
REGIONAL m.currarea, m.talkstat, m.compstat

IF SET("TALK") = "ON"
SET TALK OFF
m.talkstat = "ON"
ELSE
m.talkstat = "OFF"
ENDIF
m.compstat = SET("COMPATIBLE")
SET COMPATIBLE FOXPLUS

* ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
* º º
* º Window definitions º
* º º
* ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*

IF NOT WEXIST("picklist")
DEFINE WINDOW picklist ;
FROM INT((SROW()-23)/2),INT((SCOL()-76)/2) ;
TO INT((SROW()-23)/2)+22,INT((SCOL()-76)/2)+75 ;
TITLE win_title ;
FLOAT ;
NOCLOSE ;
SHADOW ;
DOUBLE ;
COLOR SCHEME 5
ENDIF


* ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
* º º
* º PICKLIST Setup Code - SECTION 2 º
* º º
* ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*

#REGION 1
*
* The number of items in the source array
STORE ALEN(src_array, 1) TO src_arrctr
STORE ALEN(src_array, 2) TO src_width

*
* The initial/current position of bar in source box
STORE 1 TO src_value

*
* BAR index counter for the target POPUP; it never decrements
* since the POPUP is relative
STORE 0 TO tgt_barctr

*
* Counter for the target array
STORE 0 TO tgt_arrctr

*
* The initial/current position of bar in target box
STORE 1 TO tgt_value

*
* tgt_popup is defined as relative so that ;
* moving/adding/deleting will work
DEFINE POPUP tgt_popup;
RELATIVE ;
SCROLL ;
MARGIN ;
MOVER

*
* The array "behind" the POPUP must exist, and must have the
* same width (number of columns) as the source array
IF TYPE("m.tgt_array") = "L"
STORE "temp_array" TO m.tgt_array
STORE m.src_width + 1 TO m.tgt_width
DIMENSION &tgt_array[01, m.tgt_width]
STORE 0 TO tgt_length
ELSE
STORE ALEN(&tgt_array, 1) TO tgt_length
STORE ALEN(&tgt_array, 2) TO tgt_width

FOR m.tgt_arrctr = 1 TO m.tgt_length

*
* barctr is relative, so it never decrements
STORE tgt_barctr + 1 TO m.tgt_barctr

*
* DEFINE a new BAR with the PROMPT from the source box
DEFINE BAR (m.tgt_barctr) ;
OF tgt_popup ;
PROMPT &tgt_array[m.tgt_arrctr, 01]

STORE m.tgt_barctr TO &tgt_array[m.tgt_arrctr, m.tgt_width]

ENDFOR

STORE m.tgt_arrctr - 1 TO m.tgt_arrctr
ENDIF

STORE "" TO ok_cancel
STORE .T. TO was_changd


* ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
* º º
* º PICKLIST Screen Layout º
* º º
* ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*

#REGION 1
IF WVISIBLE("picklist")
ACTIVATE WINDOW picklist SAME
ELSE
ACTIVATE WINDOW picklist NOSHOW
ENDIF
@ 0,1 TO 9,72
@ 1,2 SAY m.sourcename ;
SIZE 1,39
@ 2,3 GET src_value ;
PICTURE "@&N" ;
FROM src_array ;
RANGE 1, src_arrctr ;
SIZE 7,68 ;
DEFAULT 1 ;
WHEN _q330mtqgp() ;
VALID add_one(src_value) ;
COLOR SCHEME 6
@ 10,2 GET m.select_one ;
PICTURE "@*HN  \