Q: Howto alter list selection colors

Brian Rice water at tunes.org
Thu Feb 22 18:41:57 UTC 2007


On Feb 21, 2007, at 10:22 PM, karl wrote:

> Brian T. Rice skrev:
>> Quick question:
>>
>> If I create a PluggableListMorph and want the selection to be a
>> high-contrast inversion of color (say, white-on-black/blue)  
>> instead of the
>> red-on-grey of the current Squeak, where would I look? How do I  
>> control
>> this?
>>
>> Looking through Preferences didn't reveal anything relevant, and PLM
>> doesn't make its internal structure very obvious.
> Look at:
>
> PluggableListMorph>>textHighlightColor: aColor
>    "Set my default text highlight color."
>    self setProperty: #textHighlightColor toValue: aColor.
>
> Karl

Aha! Sadly, it was all too obvious. ;) Thanks for pointing it out.

I see that PLM actually has a #textColor and #textHighlightColor, but  
not much corresponding to background colors. So, I looked up the  
hierarchy, and tried the method finder for "backgroundcolor" and  
"selectioncolor" but didn't find something corresponding. The closest  
thing I could find was LazyListMorph>>drawSelectionOn: which  
hardcodes a light gray background, which changing successfully  
updates running lists (after a re-display). I'll put something in  
Mantis to improve this with maybe a Preference.

--
-Brian
http://briantrice.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070222/c80777f7/PGP.pgp


More information about the Squeak-dev mailing list