Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Get first visible item on ListView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get first visible item on ListView

 Post Reply Post Reply
Author
Message
MohammadGH View Drop Down
Newbie
Newbie


Joined: 02 November 2016
Location: Jordan
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MohammadGH Quote  Post ReplyReply Direct Link To This Post Topic: Get first visible item on ListView
    Posted: 02 November 2016 at 11:11am
hi :)
i'm trying  to get the first visible item on list view (view property = 0) by using "getFisrtVisible"  but it's always returns 1.
Here is a sample


Private Sub Form_Load()
Dim i As Integer
For i = 1 To 100
Dim item As ListViewItem
Set item = ListView1.ListItems.Add(, , "test")
item.SubItems(1) = CStr(i)
Next

ListView1.ListItems.item(50).EnsureVisible   ' scrolling the listview to item 50
i = ListView1.GetFirstVisible.Index 
End Sub




Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.