SP Popup Functions

 TAGMARRAY()    Tag elements in muti-dimensioned array
 STAGFIELDS()   Tag fields
 UNBOX()        Removes a box created by makebox()
 SPOPORDER()    Popup allows user to change viewing (index) order
 SPOPSEEK()     Popup seek based on present index keys
 VIEWMEMOS()    Popup viewing (non-edit mode) of memos
 VERTVIEW()     Pops up a vertical view of the current record
 TAGARRAY()     Tag selected elements of an array
 SGETMANY()     Virtual (scrolling) gets in a popup box
 AMSG()         Pop up message box for an array of messages
 POPUPDIR()     Popup of a given directory for file selection
 POPREAD()      Pops up a box with 1-5 say-get combinations
 POPVDATE()     Pops up a picklist of virtual dates
 POPEX()        Pops up an achoice for a certain filespec
 POPMONTH()     Popup month selection
 POPCOLSEL()    Popup color grid for selecting a single color
 PROGINDEX()    Perform an index with a progress box
 PROGEVAL()     Perform a Database DBEVAL() with a progress box
 POPVYEAR()     Pops up a picklist of virtual years
 PROGCOUNT()    Perform a count with a progress box
 PROGDISP()     Displays progress bar in box created with PROGON()
 PROGOFF()      Removes a progress bar box created by PROGON()
 MESSYN()       Popup YesNo prompt box
 MCHOICE()      Creates a box for an Achoice call
 MFIELDS()      Pops up an selection box for current dbf fields
 GETDATE()      Point and shoot calendar
 MAKEBOX()      Draws a box on the screen with optional shadow,
                returns saved screen
 PLSWAIT()      Pops up a 'Please Wait' window or removes it
 ONE_READ()     Pop-up window with 1-4 Say/Get combinations
 MULTMSGYN()    Multi-line popup message - yes -no
 MFIELDSTYPE()  Pops up a list of fields of given type(s)
 MSG()          Displays up to a 9 line message in a window
 HARDCOPY()     Prints current record or memo fields to printer
 EDITMEMO()     Performs a windowed memoedit() on a memo field
 ASCIITABLE()   Pops up an ASCII table for character selection
 DELREC()       Dialog box to delete/undelete current record
 EDITMEMOV()    Performs a windowed memoedit() on a string
 BROWSE2D()     Popup tbrowse of 2 dimension array (array of arrays)
 SBUNSHADOW()   Removes shadow drawn with SBSHADOW()
 ABORT()        Pops up dialog box asking: Abort  Don't Abort
 SBSHADOW()     Draw a shadow around a box
 PROGON()       Initialize and display a progress bar box
 QUIKREPORT()   Runtime pre-defined report printing module
 P_READY()      Determines if printer is ready, prompts user
 SACHOICE()     Achoice replacement, uses TBROWSE, accepts exception
                codeblock
 S1LABEL()      Prints a single label
 GETCALC()      Pops up a quick 'solar' calculator

 

SP_MCHOICE

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],[aSelectable])

  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.

  [aSelectable] is an array of logicals that determines which items
  are selectable. This array must be the same size as [aOptions], and
  all elements must be either True or False, not NIL. Where an element
  is False, the corresponding element in [aOptions] will be dimmed
  and will emit a BEEP when you attempt to select it.

  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

 

SP_AFTYPESX

AFTYPESX()

  Short:
  ------
  AFTYPESX() Returns an array of field types for current dbf

  Returns:
  --------
  <aFields> => an array of field types for the current
  dbf

  Syntax:
  -------
  AFTYPESX()

  Description:
  ------------
  AFTYPESX() creates and returns an array of field types
  from the current dbf. Unlike AFIELDS(), it does not
  require an initialized array beforehand.

  Examples:
  ---------
   aArray := AFIELDSX()
   aTypes := AFTYPESX()

   if (nSelect := mchoice(aArray,10,10,20,20,"Pick Field")) >  0

      ?"Field "+aArray[nSelect]+" was selected"
      ?" of type     "+aTypes[nSelect]

   endif

  Source:
  -------
  S_AFTYPE.PRG

 

SP_AFIELDSX

AFIELDSX()

  Short:
  ------
  AFIELDSX() Returns an array of field names for current dbf

  Returns:
  --------
  <aFields> => an array of fields for the current dbf

  Syntax:
  -------
  AFIELDSX()

  Description:
  ------------
  AFIELDSX() creates and returns an array of field names
  from the current dbf. Unlike AFIELDS(), it does not
  require an initialized array beforehand.

  Examples:
  ---------

   aArray := AFIELDSX()
   nSelect :=   mchoice( aArray ,10,10,20,20,"Pick Field")
   if  nSelect > 0
     ?"Field "+aArray[nSelect]+" was selected"
   endif

  Source:
  -------
  S_AFTYPE.PRG