dbgrid控件中当鼠标器移到一个单元格(呈蓝色显示)时的响应事件是什么?比如我想当显示当前选中的单元格的值,如何做?

解决方案 »

  1.   

    procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
    begin
      with dbgrid1 do
       begin
          if gdselected in state then
            begin
             Canvas.Brush.Color:=clred;(红色)
             Canvas.Font.Color:=clWhite;
            end;
           
          DBGrid1.DefaultDrawColumnCell(rect,datacol,column,state);
       end;
    end;
      

  2.   

    colenter事件....column.field.asstring值就是了.
      

  3.   

    谢谢,那请问楼上的,
    怎么样来 实现:当 鼠标指向dbgrid中 的一条记录后
    然后自动现实那条记录那列的 内容呢  ?
    就象 window 优化大师 那样 ,能够 自动的 提示 
    谢谢 ,最近 这个 问题 困扰我很 烦谢谢 !~~~