L
liuyang
Unregistered / Unconfirmed
GUEST, unregistred user!
条目是连续的导入没问题,要是选择的不是连续的就不对了(选择的是前几个(选择三个就是前三条)),谁能帮我改一改呢?代码如下<br>procedure Tf_main.sB_swyy2Click(Sender: TObject);<br>var<br> Iitemno,Ino,i: Integer;<br> ifsame:boolean;<br>begin<br> Iitemno:=0;<br> with sLB_swyyqb do<br> for Ino:=0 to Items.Count-1 do<br> begin<br> if Selected[Ino] then<br> begin<br> Iitemno:=Ino;<br> Break;<br> end;<br> end;<br><br> ifsame:=false;<br> with sLB_swyyqb do<br> begin<br> for Ino:=Iitemno to Iitemno+(sLB_swyyqb.SelCount-1) do<br> begin<br> for i:=0 to sLB_swyyxz.Items.Count-1 do<br> begin<br> if Items[Ino]= sLB_swyyxz.Items then<br> begin<br> ifsame:=true;<br> break;<br> end;<br> ifsame:=false;<br> end;<br> if ifsame=false then sLB_swyyxz.Items.Add(Items[Ino]);<br> end;<br> end;<br>end;