Sign in to follow this  
Followers 0
mags

Scroll to a given ListViewItem

2 posts in this topic

Hi everyone.

I have a GUI with a ListView in it. Let's say the ListView can show 10 lines at a time. Then I populate the ListView with 25 ListViewItems, so there are 15 of them that are not visible.

The question is: How can I make the listview to "scroll down" to show one of the not visible items?. Example:

- Listivew is showing items 1 to 10.

- I want to show item 15. I am looking for a way of scrolling down the listview just enough for item 15 to appear in the last line of the listview.

Thx.

Share this post


Link to post
Share on other sites

I finally figured it out :) :

const $LVM_ENSUREVISIBLE = 0x1013

GUICtrlSendMsg($listview, $LVM_ENSUREVISIBLE, $line, 0)

..where $line is the zero-based index of the line to make visible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0