|
-
Feb 8th, 2004, 02:06 AM
#1
Thread Starter
Member
What event is for scrolling in Listview box?
ok, I am looking whole day and I can't find it.
I have a listview box and Scrollable is set to True
so I can use the slider on the right site,
but what is the event for the scroll slider WITHIN that listview, so I am not talking about the external scrollbar, to do some calculatings for that.
What I want is a Listview box and I want to load 145000 lines,
since that is VERY slow, I only want to do is load 10 lines, and when I use the scrolbar on the right, add 1 row and delete the 1st row within the listview box, but I can't find the property/event for that scrollbar.
Thanks so much
-
Feb 8th, 2004, 03:28 AM
#2
It may be easier to add 'Next' and 'Previous' buttons and load different 'sets' of data that way.
-
Feb 8th, 2004, 04:09 AM
#3
well, if your listview has only 10 items, I'd say make the listview's size so only 10 items at a time would be visible, this way your listview wont have a scrollbar... then just use a vertical scrollbar. I'm just saying this because it's easier to use a scrollbar control instead
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 8th, 2004, 02:33 PM
#4
Thread Starter
Member
Ok, got a external scrollbar, but that one makes the viewbox flickering, and I am getting a error when I get to the end of the list and want to go BACK. There is NO error when I do it halfway the list, only at the end..
The fakelistview contrains 43000 items
Dim zz As Long
Dim yy As Long 'amount of rows in the viewbox
Dim s1, s2 As Long
Label1.Text = sbar.Value
yy = ListView1.Items.Count
s1 = sbar.Value - 1
s2 = sbar.Value + 8
If s2 >= sbar.Maximum Then
s2 = sbar.Maximum - 1
s1 = sbar.Maximum - 10
End If
ListView1.Items.Clear()
ListView1.BeginUpdate()
For zz = s1 To s2
Dim listItem As New ListViewItem(fakeListView.Items(zz).SubItems(0).Text) <----Failing on this line when the scrollbar is maxed and I want to go back
listItem.SubItems.Add(fakeListView.Items(zz).SubItems(1).Text)
listItem.SubItems.Add(fakeListView.Items(zz).SubItems(2).Text)
listItem.SubItems.Add(fakeListView.Items(zz).SubItems(2).Text - fakeListView.Items(zz).SubItems(1).Text)
ListView1.Items.Add(listItem)
Next
ListView1.EndUpdate()
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
|