home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / tcl / tclmotif.1 / tclmotif / tm.1.2 / programs / prog36 < prev    next >
Encoding:
Text File  |  1993-11-15  |  430 b   |  21 lines

  1. #!../src/moat -f
  2. # testing using a GC from within tcl
  3. xtAppInitialize -class Program
  4.  
  5. xmDrawingArea .d managed -width 300 -height 200
  6. .d exposeCallback show_text
  7. set gc1 [.d getGC -foreground yellow -background green]
  8. set gc2 [.d getGC -foreground blue -background pink]
  9.  
  10. proc show_text {} {
  11.   global gc1
  12.   global gc2
  13.  
  14.   .d drawImageString $gc1 30 30 "hello"
  15.   .d drawImageString $gc2 30 80 "world"
  16. }
  17.  
  18. . realizeWidget
  19.  
  20. . mainLoop
  21.