关于listbox的小问题
请问各位大哥我的listbox2中怎么才我怎么才能读取listbox1中同时选中的多个记录啊??
[解决办法]
- C/C++ code
__fastcall TForm2::TForm2(TComponent* Owner) : TForm(Owner){ for(int i=0;i<5;i++) ListBox1->Items->Add(IntToStr(i));}//---------------------------------------void __fastcall TForm2::Button1Click(TObject *Sender){ for(int i=0;i< ListBox1->Items->Count;i++) { if(ListBox1->Selected[i]) ListBox2->Items->Add(ListBox1->Items->Strings[i]); }}//---------------------------------------