如何在下面几种情况下触发一个事件?
1.StringGrid1.Cells[1, 1] := 'A';2.StringGrid1.Rows[1] := strRow;3.StringGrid1.Cols[1] := strCol;4.直接在Cell中输入时;(这个会触发OnSetEditText)
1.StringGrid1.Cells[1, 1] := 'A';2.StringGrid1.Rows[1] := strRow;3.StringGrid1.Cols[1] := strCol;4.直接在Cell中输入时;(这个会触发OnSetEditText)
但是我如何知道上述4种情况发生了呀?
在OnDrawCell事件里判断,不过DrawCell也要自己完成了
我知道有N多的人来过本贴,却没人懂这个!
看来Delphi的高手们早已经随着Borland的末落而渐渐远去,
private
function GetCells(ACol, ARow: Integer): string;
procedure SetCells(ACol, ARow: Integer; const Value: string);
public
property Cells[ACol, ARow: Integer]: string read GetCells write SetCells;
end;重新声明Cells[ACol, ARow: Integer]属性,在SetCells方法里加上inherited和你想添加的事件
你如何继承以及触发该方法呀?