jit.cellblock: How to set/reset background color for ALL cells with single message?

Michael Dessen's icon

If I have set several cells in a jit.cellblock object to have a specific background color (for example, having sent the message "cell 1 1 brgb $1 $2 $3" to a few cells), is it possible to undo this with a single message to the jit.cellblock object that will remove all of those background colors? The "refresh" and "clear all" messages do not seem to affect background colors, only cell content, and setting the default background color attribute does not change background colors for individual cells that have been set differently already. I can't believe there's no simple way to do this, so I assume I'm missing something obvious, but I can't find it. Thanks in advance for any help!

Source Audio's icon

cell x y brgb $1 $2 $3 $4
is overriding bgcolor - which sets default setting
and counts only if individual cells did not get set different.
I am afraid, you will need uzi to run through all cells with your init color
or keep a list of colored cells and dump it with init colors
whan you want.

same applies to for example colwidth $1 & col 1 width $1
and so on

Michael Dessen's icon

Thank you Source Audio for the reply! Not having a way to send an appearance formatting message to all cells at once or to a range/region of cells seems bizarre to me, given the power of Max (i.e. like you could easily do to a sheet/table in any basic spreadsheet app by simply using "select all" or selecting a region, then applying the formatting). But at least I'm glad to know I wasn't missing anything.

Source Audio's icon

jit.cellblock has more serious problems than this,
for exampe when switching between inline edit and other select modes.
for color reset, try his

Max Patch
Copy patch and select New From Clipboard in Max.

Michael Dessen's icon

Thanks! That's a great solution and helpful to see.