|
#1
|
||||
|
||||
StringGrid линии
Доброе время суток.
Кто знает как в StringGrid линии в ячейках сделать толще, только не все сразу как свойством GridLineWidth а через три (каждая третья линия толще)по горизонтали и вертикали или может их цветом другим можно выделить? Спасибо. |
#2
|
|||
|
|||
Лишь только пример обработки события OnDrawCell:
Код:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin with StringGrid1.Canvas do begin if (gdFixed in State) then Brush.Color := clBtnFace else Brush.Color := clWindow; Font.Color := clBlack; FillRect(Rect); TextOut(Rect.Left + 2, Rect.Top + 2, StringGrid1.Cells[ACol, ARow]); if (ARow mod 3 = 0) then begin Pen.Width := 3; Pen.Color := clRed; MoveTo(0, Rect.Bottom); LineTo(Rect.Right, Rect.Bottom); end; end; end; |