Toto vykresluje barevne sloupce ve StringGrid
Do včerejška vše funkční a odzkoušene ve Win XP i Win7
Včera jsen to spustil u kamoše v notasu Acer 10" a nějak se to grafice nelibi.
Vzhledově to vypada že text v 1 slopci je posunut o 1 znak vlevo a zasahuje do ID sloupcu.
Nevite kde muže byt kopanec.
Kód: Vybrať všetko
if (ARow > 0) and (ACol > 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.Style:=bsSolid;
CV.FillRect(Rect);
CV.TextOut(Rect.Left -2 , Rect.Top +2, sCellString);