home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / mcl / 2067 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  2.2 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!bill@cambridge.apple.com
  2. From: bill@cambridge.apple.com (Bill St. Clair)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: Setting dialog item body color
  5. Message-ID: <9301211546.AA19613@cambridge.apple.com>
  6. Date: 21 Jan 93 16:51:38 GMT
  7. Sender: owner-info-mcl@cambridge.apple.com
  8. Lines: 41
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. At 21:22 1/20/93 +0000, John R. Gersh wrote:
  12. >How can one set the body color of a check-box or radio-button dialog item?
  13. >(For example, if you want it to look reasonable in a dialog with a
  14. >background color.)
  15. >
  16. >(set-part-color <item> :body <new-color>) or initializing with the
  17. >equivalent part-color-list has no effect in this case; no matter what you
  18. >do, the item keeps a white body color.
  19. >
  20. >I poked around a bit around with ccl::set-control-part-color and
  21. >ccl::table-color. It appears that the control color-table is being set
  22. >properly, but this doesn't affect the way check-boxes and radio-buttons are
  23. >drawn. (Things work just fine in setting text and frame colors.) IM V has a
  24. >nice color plate that shows radio buttons and check-boxes with body colors
  25. >that match a dialog's background, so it ought to be possible.
  26. >
  27. >What gives? Is there a way to do this? (I've worked out an awfullly kludgy
  28. >work-around involving a view-draw-contents that paints the dialog-item and
  29. >then calls #_TrackControl to redo the text and frame, but this is only
  30. >partially effective for radio-buttons, and there _must_ be a better way.)
  31. >
  32. >[Note: This question was asked in this forum last summer by someone else.
  33. >I've searched the mail archives and checked with the original questioner -
  34. >it seems never to have been answered.]
  35.  
  36. The System 7 CDEF appears to use the window's :content color instead of the control's
  37. :body color as the background color when drawing check boxes and radio buttons. This is,
  38. I believe, different than System 6's behavior, though I didn't check that today.
  39. In order to make it look right, I found it necessary to both:
  40.  
  41.   (set-back-color <window> <color>)
  42.   (set-part-color <window> :content <color>)
  43.  
  44. For system 6, you may also need:
  45.  
  46.   (set-part-color <radio button or check box> :body <color>)
  47.  
  48.  
  49. -----
  50. Bill St. Clair
  51. bill@cambridge.apple.com
  52.