home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP26.EXE / CHP2609.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  753 b   |  33 lines

  1. /*
  2.    Listing 26.9 Changing GET Color in VALID Clause
  3.    Author: Greg Lief
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with the /N option!
  12.  
  13. function main
  14. local x := 0
  15. setcolor("w/n, w/r, , , w/b")
  16. @ 20,10 get x valid test(@x)
  17. ? getlist[1]:colorSpec   // W/B,W/R
  18. read
  19. return nil
  20.  
  21.  
  22. static function test(var)
  23. local ret_val := .t.
  24. if var == 0
  25.    // make GET white on cyan when highlighted,
  26.    // black on cyan when not
  27.    getactive():colorDisp("N/BG, +W/BG")
  28.    ret_val := .f.
  29. endif
  30. return ret_val
  31.  
  32. // end of file CHP2609.PRG
  33.