Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Mouse interface routines - <b>achoice()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ACHOICE()
 Replaces achoice with mouse aware routine
------------------------------------------------------------------------------
 Syntax
      achoice(<nTop>, <nLeft>, <nBottom>, <nRight>, <acMenuItems>,;
              <alSelectableItems>, <cUserFunction>, <nInitialItem>,;
              <nWindowRow>, <lUseScroll>) -> nChoice
 Arguments
      <nTop>, <nLeft>, <nBottom>, <nRight> are the upper left and
           lower right window coordinates.
      <acMenuItems> is an array of character strings to display
           as menu choices
      <alSelectableItems> is a parallel array of logical values--one
           element for each item in <acMenuItems>--that specify the
           selectable menu items.  Elements can either be logical values
           or character strings.  If the element is a character string,
           it is evaluated as a macro expression which should evaluate
           to a logical data type.  In either case, a value of false
           (.F.) means that the corresponding menu item is not
           available, and a value of true (.T.) means that it is
           available.  If <lSelectableItems> is specified instead of
           an array, false (.F.) makes all menu items unavailable and
           true (.T.) makes all menu items available.  By default, all
           menu items are available for selection.

           NOTE: The way this is implemented, you can also pass a code
           block. This appears to be compatable with standard clipper.
      <cUserFunction> is the name of a user defined function
           for handling unrecognized keystrokes
      <nInitialItem> is the position within acMenuItems which
           is initially highlighted when the menu is displayed
      <nWindowRow> is the window row on which the initial
           menu item will appear
      <lUseScroll> is a logical indicating the display and use
           of a scroll bar on the right side. Defaults to .F.

 Returns
      The number of the item selected or 0 if aborted.
 Description
      All of the arguments are meant to follow the standard CLIPPER function
      so please see the CLIPPER documentation for a better discription.

      The arguments to the optional user function has one additional
      argument (MouseKey). This argument is the inkey value of the
      equivalent mouse function if the mouse was used to cause an exception.
      Currently this is only invoked when the mouse is clicked outside of
      the achoice area which normally terminates the achoice.

 Examples


 Source: ACHOICE.PRG

 Author: Leo Letendre

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