<div dir="ltr"><div dir="ltr">On Sun, Aug 11, 2024 at 3:57 PM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 2024-08-11 12:54, Mark Volkmann via Cuis-dev wrote:<br>
<br>
> I'm struggling to understand the use of fillColor in CheckButtonMorph <br>
> after studying the code for an hour. For example:<br>
> <br>
> cb := CheckButtonMorph new.<br>
> cb fillColor: Color white.<br>
> cb openInWorld.<br>
> <br>
> This will display a checkbox with a black, rounded border filled with <br>
> white.<br>
> If you hover over it, the fill color will change to gray.<br>
> I see where that happens in the code. It is the border color with 50% <br>
> opacity.<br>
> <br>
> If you move the mouse outside the checkbox, it will change to be filled <br>
> with black.<br>
> Is this intended? I'm trying to find a way to get it to return to the <br>
> fill color I specified which is white.<br>
<br>
Looking at the code, I see that fillColor is transitory -- it changes <br>
with the state of the CheckButtonMorph.<br>
<br>
Perhaps try:<br>
<br>
Feature require: 'UI-MetaProperties'.<br>
CheckButtonMorph example1 openInWorld.<br>
<br>
Use the "Change Scale" construction handle to make it bigger.<br>
Then open the checkButtonMorph's menu and click the pushpin.<br>
As you move the mouse in and out over the checkButton and click it to <br>
change its state, you will see the fillColor change.<br>
Use the menu to change the #color and #borderColor to get what you want <br>
(e.g. color yellow, borderColor lime green).<br>
Play with it a bit more to see how the checkButton is expected to work <br>
with mouseover & mouseup/click.<br></blockquote></div><div><br></div><div>That was helpful!</div><div>I see now that by default:</div><div>- It is initially filled with the border color and that represents being unchecked.</div><div>- Hovering over it changes the fill to be the border color with 50% opacity.</div><div>- Clicking it causes the fill to change to the value of the color instance variable (defaults to white) and display a checkmark that is always black.</div><div>- There is no point in setting the fillColor instance variable because it will just get changed as soon as you hover over the morph.</div><div><br></div><div>I think I want something that behaves more like a browser checkbox or</div><div>like the checkboxes in the morph menu items "resist being picked up" and "be locked".</div><div>Just an opinion, but having a checkbox that is filled when not checked might make some users think it is checked.</div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div>