[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting dialog item body color
- To: email@example.com (John R. Gersh)
- Subject: Re: Setting dialog item body color
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Thu, 21 Jan 1993 10:51:38 -0600
- Cc: info-mcl
At 21:22 1/20/93 +0000, John R. Gersh wrote:
>How can one set the body color of a check-box or radio-button dialog item?
>(For example, if you want it to look reasonable in a dialog with a
>(set-part-color <item> :body <new-color>) or initializing with the
>equivalent part-color-list has no effect in this case; no matter what you
>do, the item keeps a white body color.
>I poked around a bit around with ccl::set-control-part-color and
>ccl::table-color. It appears that the control color-table is being set
>properly, but this doesn't affect the way check-boxes and radio-buttons are
>drawn. (Things work just fine in setting text and frame colors.) IM V has a
>nice color plate that shows radio buttons and check-boxes with body colors
>that match a dialog's background, so it ought to be possible.
>What gives? Is there a way to do this? (I've worked out an awfullly kludgy
>work-around involving a view-draw-contents that paints the dialog-item and
>then calls #_TrackControl to redo the text and frame, but this is only
>partially effective for radio-buttons, and there _must_ be a better way.)
>[Note: This question was asked in this forum last summer by someone else.
>I've searched the mail archives and checked with the original questioner -
>it seems never to have been answered.]
The System 7 CDEF appears to use the window's :content color instead of the control's
:body color as the background color when drawing check boxes and radio buttons. This is,
I believe, different than System 6's behavior, though I didn't check that today.
In order to make it look right, I found it necessary to both:
(set-back-color <window> <color>)
(set-part-color <window> :content <color>)
For system 6, you may also need:
(set-part-color <radio button or check box> :body <color>)
Bill St. Clair