procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); Const //ovde defini?ete boju. Naravno mo?ete ostaviti //i default boje. clPaleGreen = TColor($CCFFCC); clPaleRed = TColor($CCCCFF); begin //Ukoliko ?elija ima fokus oboji?ete je u drugu boju if (gdFocused in State) then begin StringGrid1.Canvas.Brush.Color := clBlack; StringGrid1.Canvas.Font.Color := clWhite; end else //Ukoliko ?elija nema fokus mo?ete koristiti //sopstvene boje If ACol = 2 //druga kolona ?e biti obojena u //zeleno then StringGrid1.Canvas.Brush.color := clPaleGreen else StringGrid1.canvas.brush.Color := clPaleRed; //Sada bojimo ?elije, ali samo, ukoliko ?elija //nije naslovna - Row/Column If (ACol > 0) and (ARow>0) then begin //Painting the Background StringGrid1.canvas.fillRect(Rect); //Bojimo tekst. Ovde mo?ete //koristiti i poravnavanje StringGrid1.canvas.TextOut(Rect.Left, Rect.Top,StringGrid1.Cells[ACol,ARow]); end; end;