Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_pop() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_POP()

 DESCRIPTION

 C_POP() displays the specified array of items in a pop-up window
 for selection of an item.  All keys are controlled by C_POP(),
 including keys to move up and down, go to the first item that
 matches the key pressed, and keys to select and cancel the
 function.  Many options can be specified including the first menu
 item to highlight, the menu color, the box type, a shadow, an
 exploding menu, and a title.

 SYNTAX

 C_POP(st_row, st_col, items [,first_item] [,color] [,box] [,savescrn]
 [,shadow] [,explode] [,title] [,arrow_exit] [,f1_exit] [,function_exit])

 PARAMETERS

 st_row (N) is the starting top, left row for the menu.

 st_col (N) is the starting top, left column for the menu.

 items (A) is the array of items to display in the menu.

 first_item (N) is the first item in the menu to highlight (1 =
 first item).  If first_item is not specified, the default of 1
 (first) is used.

 color (C) is the color of the menu.  If color is not specified, the
 current Clipper color is used.

 box (N) is the type of box (0-5) to display.  The box types are as
 follows:  0=no box, 1=single box, 2=double box, 3=double top/single
 sides, 4=single top/double sides, and 5=Solid graphics.  If box is
 not specified, box type 2 (double) is used.

 savescrn (L) indicates whether or not the screen should be saved
 when C_POP() is called and restored when exited.  Specify true
 (.T.) to save and restore the screen, or false (.F.) to overwrite
 the previous screen and leave the pop-up menu on the screen when
 C_POP() exits.  If savescrn is not specified, the default of true
 (.T.), save and restore the screen, is used.

 shadow (N) is the type of shadow to display around the menu.   The
 shadow types are as follows:  0 = no shadow, 1 = left side/bottom
 shadow, and 2 = right side/bottom shadow.  If shadow is not
 specified, no shadow is displayed.

 explode (N) indicates whether or not the menu should pop-up with an
 exploding effect and if so, how fast to display it.  Specify
 negative one (-1) or null ("") for no exploding menu, or 0 through
 99 to have an exploding window (0 = fastest, 99 = slowest).  If
 explode is not specified, the default of (-1) no exploding window
 is used.

 title (C) is a character string to display as a title on the top,
 center of the menu.  If title is not specified, no title is
 displayed.

 arrow_exit (L) indicates whether or not the left and right arrow
 keys cause C_POP() to exit.  Specify true (.T.) to allow the arrow
 keys to exit or false (.F.) to not exit.  If arrow_exit is not
 specified, the default of false (.F.) is used.

 f1_exit (L) indicates whether or not the F1 key causes C_POP() to
 exit.  Specify true (.T.) to allow the F1 key to exit or false
 (.F.) to not exit.  If f1_exit is not specified, the default of
 true (.T.) is used.

 function_exit (L) indicates whether or not any function key causes
 C_POP() to exit.  Specify true (.T.) to allow the function keys to
 exit or false (.F.) to not exit.  If function_exit is not
 specified, the default of true (.T.) is used.

 DEFAULT KEY DEFINITIONS AND ACTIONS

 KEY PRESSED   ACTION TAKEN BY C_POP()
 -----------   -----------------------
 ENTER         Exit and return the current item number highlighted
 ESCAPE        Exit and return zero (0)
 UP-ARROW      Highlight previous item; if first item, highlight last
 DN-ARROW      Highlight next item; if last item, highlight first
 LT-ARROW      Exit C_POP(), if the arrow_exit parameter is true
 RT-ARROW      Exit C_POP(), if the arrow_exit parameter is true
 HOME          Highlight first item in list
 END           Highlight last item in list
 F1-F10        Exit and return the current item number highlighted
               (unless the f1_exit or function_exit parameter is false).
               Note that any shift, ctrl, or alt combination causes an exit.
 A-Z, a-z      If the key pressed matches the first letter of an item in the
               list, C_POP() will exit and return the matching item number.

 RETURNS

 C_POP() returns the current item number that is highlighted in the
 array of items when C_POP() exits, or a zero (0) if ESCAPE is
 pressed.  Note that Clipper's LASTKEY() function can be used to
 determine the last key that was pressed in C_POP().

 EXAMPLES

 declare arr[3]        && Declare menu choice array
 arr[1] = " Add"
 arr[2] = " Change"
 arr[3] = " Delete"

 && Display pop-up menu at row 5, column 5, in blue on white with a white
 && on red highlight bar, a double box, a shadow, and an exploding effect.
 ans = c_pop(5,5,arr,1,"B/W,W/R",2,.T.,2,3,"RECORD OPTIONS")


See Also: C_PICK() C_SELECT() C_MENU() C_MENUBAR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson