1. 首先继承一个listbox,来获得按住ctrl键时,点击的item public class ListBoxEx : ListBox { public BeatTemplateWave GetAnitem() { var obj = this.AnchorItem; if (obj != null) { Type type = obj.GetType(); System.Reflection.PropertyInfo propertyInfo = type.GetProperty("Ite…
解决方案 » 有了dbgrid1.options.dgmultiselect:=true;必须按下Ctrl键,才能实现多选, 修改源代码,把以下内容if Select and (ssShift in Shift) then改为if Select then 记住是在DBGRIDS单元里: if ssCtrl in Shift then //这句改为if true then还有把以下这段去掉: if ssCtrl in Shift then Curr…
////删除多选记录 procedure THistoryForm.DeleteButtonClick(Sender: TObject);var tempBookMark:TbookMark; i:integer;begin if dbgrid1.SelectedRows.Count <= 0 Then begin MessageBox(Handle,'请选择您要删除的记录','提示',MB_OK); Exit; end; If MessageBox(Handle,'删除后…