[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SET-PART-COLOR for table-items



I would like to use SET-PART-COLOR to set the color of a particular cell in
a table-dialog-item with tons of cells (20 X 10).

this works fine, but forces a complete redraw of the table, since
set-part-color for dialog-items calls invalidate-view.

As a workaround i copied parts of the set-part-color source for the
table-dialog-item and modified is as follows

(defmethod set-cell-color ((part table-dialog-item) cell new-color)
  (if new-color
    (setf (getf (slot-value part 'ccl::color-list) cell) new-color)
    (remf (slot-value part 'ccl::color-list) cell))
  )

and call an explicit redraw-cell afterwards.

This works as expected, but however I don't feel comfortable with using
undocumented mcl internals. Is there a better way do do this, perhaps with
invalidate-cell, if such a beast exists?

Karsten