oncellselect if col=3 then option := option - [goediting] else option := option + [goediting]请大家去 http://www.new7wonders.com/c/voting.php 投长城一票
procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean); begin if (ARow=1) and (ACol=1) then StringGrid1.Options:=StringGrid1.Options-[goEditing] else StringGrid1.Options:=StringGrid1.Options+[goEditing]; end;//写OnSelectCell事件
procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean); begin if (acol=2) and (arow=2) then canselect:=false;//不可选择 end
if col=3 then
option := option - [goediting]
else
option := option + [goediting]请大家去 http://www.new7wonders.com/c/voting.php 投长城一票
ARow: Integer; var CanSelect: Boolean);
begin
if (ARow=1) and (ACol=1) then
StringGrid1.Options:=StringGrid1.Options-[goEditing]
else
StringGrid1.Options:=StringGrid1.Options+[goEditing];
end;//写OnSelectCell事件
ARow: Integer; var CanSelect: Boolean);
begin
if (acol=2) and (arow=2) then
canselect:=false;//不可选择
end