Forum > General
TStringgrid
(1/1)
Anonymous:
Hello
I can't color one cell with TStringgrid. How can I do it?
Thanx for all
HLopes
jesusr:
--- Quote from: "Anonymous" ---Hello
I can't color one cell with TStringgrid. How can I do it?
Thanx for all
HLopes
--- End quote ---
This is very easy, select the grid and in the object inspector create a event for OnPrepareCanvas. By clicking in the [...] button lazarus will create a empty handler. There you can write something like:
--- Code: ---
begin
...
// cell[1,1] will be painted as blue
if (col=1)and(row=1) then begin
stringgrid1.canvas.brush.color := clBlue;
end;
...
end;
--- End code ---
Regards.
Jesus Reyes A.
Navigation
[0] Message Index