@alexbmasis_gitlab It is possible but not straight forward (for the example, I assume that you are using the Python 3 version of pyspread, i.e. >1.99.0): Enter
def color(value, condition_func, X, Y, Z):
if condition_func(value):
color = 255, 0, 0
else:
color = None
S.cell_attributes[X,Y,Z]["bgcolor"] = color
return value
into the macro panel and
color(5, lambda x: x>4, X, Y, Z)
into a cell. If you change the first parameter in the cell's function from 5 into 1 then the background color changes back to white.
from pyspread.pyspread import main; main()
S[3,1,0]=repr("MyString")
inserts code into the cell 3,1,0, which results in the string MyString being displayed.
S.cell_attributes[X,Y,Z]["bgcolor"] = color
from a button. But if I simple do S[X,Y,Z]=12
nothing happens.a=1
and in the target cell a
; def set_cell():
S[1,2,0] = "234"
and in the button cell set_cell()