以下是有关的程序代码: PRocedure TUnitDetail.DBGrid1ColEnter(Sender:TObject); begin case DBGrid1.SelectedIndex of 0:DBEdit1.DataField:=Unit?Num; 1:DBEdit1.DataField:=UnitName; 2:DBEdit1.DataField:=Header; 3:DBEdit1.DataField:=Address; 4:DBEdit1.DataField:=Tel; end; end;
procedure TUnitDetail.SBCopyClick(Sender:TObject); begin DBEdit1.CopyToClipboard; end;
procedureTUnitDetail.SBPasteClick(Sender:TObject); begin DBEdit1.PasteFromClipboard; DBGrid1.SelectedField.AsString:=DBEdit1.text; end;