X xibaixin Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-29 #1 请大家说说:如何在dbgrid控件中单击引出一个事件,也就是说,单击dbgrid表格,触发一个事件,我在里面可以加代码。比如,单击或者双击某个表格,然后有些表格变成蓝色的。先谢了。
S songrun Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-29 #2 有三個方法可以實現,onclick/oncellclick/ondblclick,變色什麽的,可以用cell,col,row等定位
E enterwin Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-29 #3 DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); OnCellClick/OnDblClick. 配合OnDrawColumnCell.
DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); OnCellClick/OnDblClick. 配合OnDrawColumnCell.
K knight_fox Unregistered / Unconfirmed GUEST, unregistred user! 2007-04-02 #6 procedure TForm1.DBGrid1CellClick(Column: TColumn); begin DBGrid1.Color := clBlue; end; 在DBGrid1中的OnCellClick事件中
procedure TForm1.DBGrid1CellClick(Column: TColumn); begin DBGrid1.Color := clBlue; end; 在DBGrid1中的OnCellClick事件中
K knight_fox Unregistered / Unconfirmed GUEST, unregistred user! 2007-04-02 #7 procedure TForm1.DBGrid1CellClick(Column: TColumn); begin DBGrid1.Color := clBlue; end; 在DBGrid1中的OnCellClick事件中
procedure TForm1.DBGrid1CellClick(Column: TColumn); begin DBGrid1.Color := clBlue; end; 在DBGrid1中的OnCellClick事件中