如何取得ListBox中的内容

sunnyasp 2003-04-17 10:18:36
小弟想将ListBox中的内容一条一条的取出,但只能取到第一条的内容,还请指教!!!
...全文
72 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
_i_ 2003-04-17
  • 打赏
  • 举报
回复
Tlistbox.Items就是所有内容 TStrings
u2m 2003-04-17
  • 打赏
  • 举报
回复
for i := 0 to ListBox1.count -1 do
showmessage(ListBox1.Items[i]);
lty 2003-04-17
  • 打赏
  • 举报
回复
edit1.Text:=ListBox1.Items[i];
careerist 2003-04-17
  • 打赏
  • 举报
回复

for i := 0 to ListBox1.count -1 do
edit1.Text:=ListBox1.Items[i];
sunnyasp 2003-04-17
  • 打赏
  • 举报
回复
这样只能取到第一条的内容啊,是不是ListBox1.Itemindex可以递增啊?
jackie168 2003-04-17
  • 打赏
  • 举报
回复
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
edit1.Text:=ListBox1.Items[ListBox1.itemindex];
end;

2,507

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧