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)
展开
 我来答
艾三毛
2011-10-26 · TA获得超过139个赞
知道小有建树答主
回答量:484
采纳率:100%
帮助的人:238万
展开全部
if ((Acol=3) and (ARow=2))then你这样试试
柳营笑者
2011-10-26 · 超过18用户采纳过TA的回答
知道答主
回答量:50
采纳率:0%
帮助的人:45.6万
展开全部
主要就是运算符的优先级还有就是运算的方向。这样写就没有事了: (Acol=3) and (ARow=2) ,或者 (Acol=3) and (ARow=2) .你可以编写程序去了解DELPHI是怎么去编译运算符的。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式