注册 登录
编程论坛 Delphi论坛

求助

shankui 发布于 2008-10-09 16:52, 1117 次点击
begin
   memo1.lines.add(edit1.Text);
   if listbox1.Itemindex>=0
   then memo1.Lines.Add(listbox1.ltems[listbox1.Itemindex]);
end
那有问题怎么执行不了呢
3 回复
#2
ruanjian21102008-10-09 22:12
begin
   memo1.lines.add(edit1.Text);
   if listbox1.Itemindex>=0  then
   begin
   memo1.Lines.Add(listbox1.ltems[listbox1.Itemindex]);
end;
end;
end.
#3
anthony6342008-10-10 10:47
说明listbox1.Itemindex的值是-1,或者你这个函数是在什么地方执行的,没见你贴出来
#4
shankui2008-10-10 13:19
谢谢 现在好了
1