|
-
Nov 19th, 2012, 10:07 PM
#1
Thread Starter
Addicted Member
listview help
how do i go around doing this with listview
If List2.ListIndex = List2.ListCount - 1 Then
List2.ListIndex = 0
Else
List2.ListIndex = List2.ListIndex + 1
End If
please help need this done with listview
2: i need code so if listview lastitem is selected go to first item again
Last edited by bogaa; Nov 19th, 2012 at 10:25 PM.
-
Nov 19th, 2012, 11:29 PM
#2
Re: listview help
Is this what you want?
vb Code:
Private Sub listview1_ItemClick(ByVal Item As MSComctlLib.ListItem) For x = 1 To ListView1.ListItems.Count If x = x - 1 Then ListView1.ListItems.Item(0).Selected = True Else ListView1.ListItems.Item(1).Selected = True End If Next End Sub
Last edited by Nightwalker83; Nov 20th, 2012 at 02:53 AM.
Reason: Fixed spelling!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Nov 20th, 2012, 12:10 AM
#3
Re: listview help
If memory serves Listview starts with an index of 1 rather than 0 so the -1 is not needed at the first item would be at index 1 instead of 0
2 threads on basically the same question and it would appear that you have not even tried to do it yourself.
-
Nov 20th, 2012, 07:45 AM
#4
Junior Member
Re: listview help
Point 2.
use this code
Code:
Private Sub ListView1_Click()
If ListView1.ListItems.Item(ListView1.ListItems.Count).Selected = True Then ListView1.ListItems.Item(1).Selected = True
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|