셀의 색상변경 썸네일형 리스트형 stringgrid의 특정 셀의 색상을 변경하는 코드 procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var Grid: TStringGrid; begin Grid := Sender as TStringGrid; // Set color for cell in row 2 and column 3 if (ACol = 3) and (ARow = 2) then begin Grid.Canvas.Brush.Color := clRed; Grid.Canvas.FillRect(Rect); end; // Draw cell contents Grid.Canvas.Font := Grid.Font; Grid.Canvas.TextRect(R.. 더보기 이전 1 다음