home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / tcl / 2452 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.5 KB

  1. Path: sparky!uunet!gatech!destroyer!news.itd.umich.edu!spencer
  2. From: spencer@med.umich.edu (Spencer W. Thomas)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: WANTED--Rx for Anemic Colors (P.S.):
  5. Date: 22 Jan 93 10:50:31
  6. Organization: University of Michigan HSITN
  7. Lines: 33
  8. Message-ID: <SPENCER.93Jan22105031@guraldi.med.umich.edu>
  9. References: <C183HD.H4x@ra.nrl.navy.mil> <C18410.HGG@ra.nrl.navy.mil>
  10. NNTP-Posting-Host: guraldi.itn.med.umich.edu
  11. In-reply-to: feirtag@wave3i.nrl.navy.mil's message of Thu, 21 Jan 1993 21:36:35 GMT
  12.  
  13. I tried Fred Feirtag's script (create two labels, one colored
  14. "bisque1" and one the default color), and both labels were the same
  15. color with my copy of tk3.0.
  16.  
  17. > How do you retrieve the color of a widget?
  18.  
  19. .bisque1 configure -bg
  20. -background background Background #ffe4c4 bisque1
  21.  
  22. The 4th (3 counting from 0) element, #ffe4c4, is the numeric
  23. definition of the color, the 5th element is the name.
  24.  
  25. .default configure -bg
  26. -background background Background #ffe4c4 #ffe4c4
  27.  
  28. Note that the numeric definition is the same, but there is no
  29. associated name.
  30.  
  31. > How do you reset a widget to the default color?
  32.  
  33. If you have one that you know has the default color, then get its
  34. color
  35.     set default_color [lindex [.default configure -bg] 4]
  36. and use it
  37.     .bisque1 configure -bg $default_color
  38.  
  39. If you don't have a widget known to have the default color, then make
  40. one first.
  41.  
  42. --
  43. =Spencer W. Thomas         |  Info Tech and Networking, B1911 CFOB, 0704
  44.    "Genome Informatician"    |  Univ of Michigan, Ann Arbor, MI 48109
  45. Spencer.W.Thomas@med.umich.edu    |  313-747-2778, FAX 313-764-4133
  46.