20th
Июл

Как выделить последнюю строку в DBGrid?

Posted by Chas under Пост-обзор

volod3000:
само выделение строки, приблизительно так :


procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject;// событие ТDBGrid OnDrawColumnCell
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if ( Rect.Top = DBGrid1.CellRect( DBGrid1.Col, DBGrid1.Row ).Top ) and
( not ( gdFocused in State ) or not DBGrid1.Focused ) then begin
DBGrid1.Canvas.Brush.Color := clRed;
end;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;

тема на форуме

Похожие статьи

Теги: |