[Cuis-dev] background color of LayoutMorphs in a SystemWindow

Mark Volkmann r.mark.volkmann at gmail.com
Sat Feb 8 12:39:45 PST 2025


Currently, as far as I understand, it is not possible to set the background
color of a LayoutMorph that is inside a SystemWindow. For example, evaluate
the following in a Workspace:

window := SystemWindow new.
column := window layoutMorph.
column color: Color pink.
column addMorph: (LabelMorph contents: 'foo').
column addMorph: (LabelMorph contents: 'bar').
window openInWorld.

The background color of column will be white (or maybe transparent)
despite the attempt to change it to pink.

The attached change set provides a way to opt-in to changing the colors of
LayoutMorphs inside a SystemWindow. After creating a SystemWindow, add this
line:

window canColorLayouts: true.

Now column will have a background color of pink. Perhaps there is a better
name than canColorLayouts:.

Credit to Mariano Montone for pointing me toward this solution!

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250208/34aab70f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7045-CuisCore-MarkVolkmann-2025Feb08-14h25m-RMV.001.cs.st
Type: application/octet-stream
Size: 1393 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250208/34aab70f/attachment.obj>


More information about the Cuis-dev mailing list