
delphi 语法哪里不对??晕死了
procedureTForm1.StringGrid1DrawCell(Sender:TObject;ACol,ARow:Integer;Rect:TRect;State...
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if (gdfocused in state) then
begin
if (Acol=3 and ARow=2) then
begin
BitBtn1.SetBounds(rect.Left+StringGrid1.Left+1,rect.Top+StringGrid1.Top+1,rect.Right-rect.Left+2,rect.Bottom-rect.Top+2);//绑定单元格,本来可以不加2的,总是发现 ComboBox 的 size 要比单元格小,所以干脆膨胀好了
BitBtn1.Visible:=true;
BitBtn1.SetFocus;
end;
end;
end;
=========
提示这句不对呢 if (Acol=3 and ARow=2) 展开
Rect: TRect; State: TGridDrawState);
begin
if (gdfocused in state) then
begin
if (Acol=3 and ARow=2) then
begin
BitBtn1.SetBounds(rect.Left+StringGrid1.Left+1,rect.Top+StringGrid1.Top+1,rect.Right-rect.Left+2,rect.Bottom-rect.Top+2);//绑定单元格,本来可以不加2的,总是发现 ComboBox 的 size 要比单元格小,所以干脆膨胀好了
BitBtn1.Visible:=true;
BitBtn1.SetFocus;
end;
end;
end;
=========
提示这句不对呢 if (Acol=3 and ARow=2) 展开
2个回答
展开全部
if ((Acol=3) and (ARow=2))then你这样试试
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询