안녕하세요? 유승우 입니다.
원하시는 것이 이건지는 모르겠네요..
밑의것을 참조하세요..(참고로 이 이벤트를 쓸때는 DBGRID위에 그리는작업을 하지 마세요.)
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
If Column.Field.FieldNo = DBGrid1.SelectedIndex then
Begin
Label1.Caption := 'Left ' + IntToStr(Rect.Left);
Label2.Caption := 'Right ' + IntToStr(Rect.Right);
Label3.Caption := 'Top ' + IntToStr(Rect.Top);
Label4.Caption := 'Bottom ' + IntToStr(Rect.Bottom);
Label5.Caption := 'FieldNo ' + IntToStr(Column.Field.FieldNo);
Label6.Caption := 'RecNo ' + IntToStr(Table1.RecNo);
End;
end;
그럼 이만.
|