home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 26.9 Changing GET Color in VALID Clause
- Author: Greg Lief
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function main
- local x := 0
- setcolor("w/n, w/r, , , w/b")
- @ 20,10 get x valid test(@x)
- ? getlist[1]:colorSpec // W/B,W/R
- read
- return nil
-
-
- static function test(var)
- local ret_val := .t.
- if var == 0
- // make GET white on cyan when highlighted,
- // black on cyan when not
- getactive():colorDisp("N/BG, +W/BG")
- ret_val := .f.
- endif
- return ret_val
-
- // end of file CHP2609.PRG
-