简单问题提问,急急急,祝大家节日快乐

messah 2003-09-11 10:49:52
如何将listbox中选中的内容显示到edit中去。开发环境为DELPHI7,listbox中没有select属性啊。
...全文
40 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
gossan 2003-09-11
  • 打赏
  • 举报
回复
Edit1.Text:=ListBox1.Items[ListBox1.ItemIndex];
messah 2003-09-11
  • 打赏
  • 举报
回复
那么为什么我一双击edit中就显示了listbox中的所有数据呢?
hongqi162 2003-09-11
  • 打赏
  • 举报
回复
procedure TForm1.ListBox1Click(Sender: TObject);
begin
edit2.text:=listBox1.Items[ListBox1.ItemIndex];
end;
IORILI 2003-09-11
  • 打赏
  • 举报
回复
procedure TForm1.ListBox1Click(Sender: TObject);
begin
edit1.Text :=listbox1.Items.Strings[listbox1.itemindex];
end;
江山易改 2003-09-11
  • 打赏
  • 举报
回复
Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex ] ;
moqiyayan 2003-09-11
  • 打赏
  • 举报
回复
procedure TForm1.ListBox1Click(Sender: TObject);
begin
Edit1.text:=ListBox1.Items[ListBox1.ItemIndex];
end;
suwen88 2003-09-11
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
var
listbox_index:integer;
listbox_str: string;
begin
listbox_index := listbox1.ItemIndex;
listbox_str := listbox1.Items.Strings[listbox_index];
edit1.Text :=listbox_str

end;

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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