Am 24.06.2007 um 00:44 schrieb Juraj Kubelka: It is possible to use TextEmphasis>>bold now but TextColor>>green attribute doesn't work.
Yes, thats why the standard colors in LazyListMorph overwrite your chosen color. LazyListMorph >>display: atRow:on: looks like that:
display: item atRow: row on: canvas "display the given item at row row" | drawBounds | drawBounds := self drawBoundsForRow: row. drawBounds := drawBounds intersect: self bounds. item isText ifTrue: [ canvas drawString: item in: drawBounds font: (font emphasized: (item emphasisAt: 1)) color: (self colorForRow: row) ] ifFalse: [ canvas drawString: item in: drawBounds font: font color: (self colorForRow: row) ].
The item is your displayString but the color is changed to LazyListMorph >>colorForRow: which turns out to be the follow:
colorForRow: row ^(selectedRow notNil and: [ row = selectedRow]) ifTrue: [ Color red ] ifFalse: [ self color ].
It seems that those things are really in the guts of the system and because of that they cannot be parameterized easily (yet). |
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
|