[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checkbox backgroung



At  3:00 PM 94.07.14 +0000, Kim Binsted wrote:
>Is there an easy way to change the background colour of a check-box?
>:frame seems to be the outline of the little box, :text the text, and
>:body and :thumb nothing in particular.
>
>Thanks,
>
>Kim.

Here're a couple related postings from last month.

e

=======

X-Sender: gray@aristotle.ils.nwu.edu
Mime-Version: 1.0
Date: Wed, 8 Jun 1994 15:07:06 -0600
To: e@flavors.com (Doug Currie, Flavors Technology, Inc.)
From: geek@nwu.edu (Joey Gray)
Subject: Re: Setting the background color for a checkbox?

At 10:16 AM 6/8/94 -0500, you wrote:
>>From info-mcl a couple months ago...
>
>>>       I can't get radio-button-dialog-items or check-box-dialog-items to
>>> display in any background color other than white....
>>
>>> (setf test (make-instance 'window :color-p t ))
>>
>>        [code elided]
>>
>>> (set-back-color test *green-color*)
>>
>>To get the right background colors for control dialog items you have to do
>>
>>(set-part-color test :content *green-color*)
>>
>>instead of the set-back-color. It's just one of those mysteries ...
>>
>e

bogus. that's exactly what i wanted to avoid since i have other views in
that same window that need the white background. :-(

fortunately, someone else has sent me what i needed: a way to patch the
EraseRect trap temporarily while drawing the check box so that the area
behind the check box doesn't get erased.

thanks!

-joey


=======

Mime-Version: 1.0
Date: Tue, 14 Jun 1994 13:58:49 -0400
To: Andrew Newell Mickish <am2q+@andrew.cmu.edu>,
        info-mcl@ministry.cambridge.apple.com
From: bill@cambridge.apple.com (Bill St. Clair)
Subject: Re: Setting the background color for a checkbox?

At  3:44 PM 6/9/94 -0400, Andrew Newell Mickish wrote:
>Myrland,
>
>I'm not sure if this example can be extended to checkboxes, but I have
>been using it very successfully for keeping views different colors from
>their containing views.

I have not tried Andrew's fix.
Check box dialog items use the window's :content color.
Hence, the following code will produce a window with a red background
and a checkbox whose background is also red:

  (let ((w (make-instance 'window
             :color-p t
             :window-show nil))
        (b (make-instance 'check-box-dialog-item
             :dialog-item-text "Check Box")))
    (set-part-color w :content *red-color*)
    (set-part-color b :frame *blue-color*)
    (set-part-color b :text *green-color*)
    (set-view-container b w)
    (window-show w))


=======