[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION MCHOICE()

  Short:
  ------
  MCHOICE() Does a boxed, achoice() style popup on an array

  Returns:
  --------
  <expN> Achoice selection

  Syntax:
  -------
  MCHOICE(aOptions,[nTop,nLeft],[nBottom,nRight],[cTitle],[lTrigger],;
                   [nStart],[@nRow])

  Description:
  ------------
  Provides a box for selection from array <aOptions> of
  character elements.

  [nTop,nLeft] may be specifed to determine the
  starting top and left of the popup box.

  [nBottom,nRight] may be specified to complete the box
  dimensions.

  Default box dimensions are centered on the screen. If the dimensions
  passed are not wide enough to display the mouse hot areas on the
  bottom, the box is widened and centered on the screen.

  [cTitle] is a string to display at the top of the box.

  [lTrigger] determines (yes or no) whether a return is
  to be executed on a first letter match.(default .f.)

  [nStart] optional starting element (default 1)
  [@nRow] optional starting row. Pass by reference to retain value
  between calls.


  Examples:
  ---------
   aMeals   := {"Pizza","Chicken","Chinese"}
   nSelect  := mchoice(aMeals)

   // or box with title
   aMeals   := {"Pizza","Chicken","Chinese"}
   nSelect  := mchoice(aMeals,,,,"Meals")

   // or box with title, first letter match = return and top/left specified
   aMeals   := {"Pizza","Chicken","Chinese"}
   nSelect  := mchoice(aMeals,10,10,,,"Meals",.t.)

   //to retain element and position between calls
   nSelect := 1
   nRow    := 1
   aMeals   := {"Pizza","Chicken","Chinese"}
   while nSelect > 0
     nSelect  := mchoice(aMeals,,,,,"Meals",.t.,nSelect,@nRow)
     // code
   endif


  Notes:
  -------
  Bottom of window adjusts (shrinks) to adjust to array
  size if needed.

  Now uses Tbrowse() instead of ACHOICE().

  Source:
  -------
  S_MCHOI.PRG


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson