本文整理自网络,侵删。
ListBox中获取选择行的值
它的代码如下:
代码:
Var Str :String;
begin
Str :=ListBox1.Items.Strings[ListBox1.ItemIndex];
end;
看到了吧?是利用ItemIndex返回一个Integer值给Items的Strings
相关阅读 >>
Delphi 使用 idhttp 获取 utf-8 编码的中文网页
Delphi研究之驱动开发篇(七)--利用共享内存与用户模式
Delphi yesterday、today、tomorrow - 昨天、今天、明天
Delphi webbroker standalone 模式下当作一个普通的 webserver 响应静态网页或其它文件的请求
更多相关阅读请进入《Delphi》频道 >>