Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 10th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 3  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. What is the rect of a clicked Title on a TDBGrid in Delphi?
  2. type
  3. ...
  4.   THackedGrid = class(TDBGrid);
  5. ...
  6. implementation
  7. ...
  8. procedure TForm1.DBGrid1TitleClick(Column: TColumn);
  9. var
  10.   currRow : Integer;
  11.   rect : TRect;
  12. begin
  13.   currRow := THackedGrid(DBGrid1).Row;
  14.   rect := THackedGrid(DBGrid1).CellRect(Column.Index+1,currRow);
  15. end;