home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / dbase / udfs / udf2.prg < prev    next >
Text File  |  1992-05-06  |  1KB  |  37 lines

  1. /*
  2.  
  3. Author:           DAVID -(FLASH)- GORDON     CompuServ ID - 75130,3664
  4.  
  5. Originally:       Program COPYRIGHT 1991, FlashPoint
  6.  
  7. Now and Forever:  Released into the Public Domain
  8.  
  9. Note:             FlashPoint is a Registered Trademark
  10.  
  11. Purpose:          CheckMark() was designed as a type a button for simple
  12.                   GET fields.  When getting several fields that are user
  13.                   options, it does not really matter what key the user 
  14.                   presses to select a feature.  All that matters is that 
  15.                   the LEN(TRIM( cField )) # 0.  This function will display
  16.                   a check mark "√" (or square root symbol) which is visually
  17.                   pleasing to the end user.
  18. */
  19.  
  20. * Usage In Your Application
  21. ******************************************************************************
  22.  
  23. LOCAL cField := SPACE(1)
  24.  
  25. @ 10,30 GET cField PICTURE "@!" VALID CheckMark(10, 30, @cField)
  26.  
  27. ******************************************************************************
  28.  
  29. FUNCTION CheckMark(nRow, nColumn, cField)
  30.     IF VALTYPE(cField) # "C" .or. VALTYPE(nRow) # "N" .or. VALTYPE(nColumn) # "N"          
  31.         RETU .F.
  32.     ELSE
  33.         IIF(LEN(TRIM(cField)) == 0, cField := " ", cField := "√") 
  34.         @ nRow,nColumn SAY cField  
  35.     ENDIF
  36. RETURN .T.
  37.