vb-listview-plz help me out
- From: deepa.kr@xxxxxxxxxxxxxxx
- Date: 10 Aug 2005 23:12:24 -0700
hi all.i have two listview's and i add items from one listview to
another.i have the code below:
Private Sub Command3_Click()
Dim i As Integer
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected Then
ListView2.ListItems.Add , , ListView1.ListItems(i).Text,
ListView1.ListItems(i).Icon
End If
Next i
For i = ListView1.ListItems.Count To 1 Step -1
If ListView1.ListItems(i).Selected Then
ListView1.ListItems.Remove (i)
End If
Next i
End Sub
The problem with the above is when the form gets loaded for the first
time,the first item in the listview is moved to the second
listview,without selecting the item, when i click the command button.
if i place a breakpoint on "If ListView1.ListItems(i).Selected Then "
the value shown is TRUE....but i have not at all selected the
listviewitem....
how can i solve this problem??????
please help me out....
thanks in advance
.
- Follow-Ups:
- Re: vb-listview-plz help me out
- From: Ivar
- Re: vb-listview-plz help me out
- From: Michael Cole
- Re: vb-listview-plz help me out
- Prev by Date: Re: Common Dialog - Change file extension
- Next by Date: Re: vb-listview-plz help me out
- Previous by thread: display only one record in crystal report using VB
- Next by thread: Re: vb-listview-plz help me out
- Index(es):