Moh byh ještě jeden dotaz ohledně StringGridu.
V tabulce mam barevne sloupce.
if ARow > 0 then
Begin
CV := TStringGrid(Sender).Canvas;
sCellString := TStringGrid(Sender).Cells[ACol, ARow];
case ACol of
1,2,4: if (gdSelected in State) or (gdFocused in State) then CV.Font.Color := clblack
Else CV.Font.Color := clblack;
3,6: if (gdSelected in State) or (gdFocused in State) then CV.Font.Color := clRed
Else CV.Font.Color := clRed;
5,7: if (gdSelected in State) or (gdFocused in State) then CV.Font.Color := clBlue
Else CV.Font.Color := clBlue
end;
CV.Brush.Color:=clWhite;
CV.Brush.Style:=bsSolid;
CV.FillRect(Rect);
CV.TextOut(Rect.Left -2 , Rect.Top +2, sCellString);
end;
end;
Proč se vertikal ID sloupce zobrazuji takto
http://i40.tinypic.com/2a8kaia.jpg
a nemaji šedou barvu jak jak maji mit a jak ma horizontalni ID .
Kod vubec nezasahuje do 0 ID buněk.