Delphi DBGrid 改变行颜色
procedure TForm1.DBGrid2DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if gdSelected in State then //改变选中行的颜色
网事随记
procedure TForm1.DBGrid2DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if gdSelected in State then //改变选中行的颜色
DBGrid1->Options: dgRowSelect True dgRowAlwaysShowSelection True Edit1.Text := DBGrid1.DataSource.DataSet.FieldByName('cloumn_name').Value;
Delphi Adjust Column width DBGrid procedure FitGrid(Grid: TDBGrid); const C_Add=3; var ds: TDataSet; bm: TBookmark;
V