01]下拉ComboBox1选择
参考:C:\lazarus\examples\gridexamples\gridcelleditor
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer; var Editor: TWinControl); begin if (aCol=3) and (aRow>0) then begin //哪些单元格 显示 ComboBox1 ComboBox1.BoundsRect:=StringGrid1.CellRect(aCol,aRow); ComboBox1.Text:=StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]; Editor:=ComboBox1; end; end;
ComboBox1选择完数据后,将选择结果返回给StringGrid1
标签:end,aCol,17,aRow,StringGrid1,Lazarus,ComboBox1 From: https://www.cnblogs.com/tulater/p/18028681