Le 03/04/2016 20:00, Henrik Nergaard a écrit :
Let me return you the question then: do you do a composition of
submorphs if you're trying to get a different drawOn:?
Oh, ok, that's true FastTable does it for the selection... changing
background color by encapsulating a row in another Morph with the
right background color.
Did, not anymore.
FTTableRowMorph>>#selectionColor:
Had to check the following code to be sure:
(highligtedRowIndexes includes: rowIndex) ifTrue: [
row selectionColor: (self owner colorForSelection:
primarySelectionIndex = rowIndex) ].
Was there a measurable inpact when changing that?
Because I have now three ways of doing this, and all of them have
trade-offs. For example the one above suppose that row items are a
specific kind of Morph, i.e. FTTableRowMorph; one could do without a
dedicated Morph subclass for rows and display the selection as a
transparent colored rectangle over the row; this is what I do.
Thierry