导航:
论坛 -> DELPHI技术
斑竹:liumazi,sephil
作者:
2003/6/21 13:22:44
标题:
加入我的收藏
楼主:
怎么删除选中的item! 用listbox1.items.delete(i) 我该如何判断i对应的是我选中的数据!
----------------------------------------------
虽千万人吾往矣!
作者:
123 (猪猪)
★☆☆☆☆
-
盒子活跃会员
2003/6/21 13:50:25
1楼:
i:=listbox1.selectindex; 好像有这个属性哈。
----------------------------------------------
-
作者:
2003/6/21 16:12:23
2楼:
没有这个属性,不过我用lstType.Items.Delete(lstType.ItemIndex);解决了! 不过还是很感谢猪猪你看我了问题!
----------------------------------------------
虽千万人吾往矣!
作者:
boy (阿門)
★☆☆☆☆
-
盒子活跃会员
2003/6/21 16:23:41
3楼:
var i: integer; begin for i:= ListBox1.Items.Count-1 downto 0 do if ListBox1.Selected[i] then ListBox1.Items.Delete(i); end;
----------------------------------------------
Delphi開發◆伺服器架設◆免安裝APACHE,PHP,CGI Perl, MYSQL ★