Solved

scrolling two listview controls simultanesouly.

Posted on 2006-10-23
5
304 Views
Last Modified: 2008-02-01
friends,

i have two listview controls, placed next to each other. Each of them have 1000 records [listview style = report]

If i scroll the 'right hand side' listview control vertically, parallelly i want even the 'left hand side' listview control to scroll so that if rows 55 to 65 are displayed on the righthandside listview, the same 55 to 65 rows must be displayed on the left side also.
0
Comment
Question by:expertfan
5 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17793571
0
 
LVL 5

Expert Comment

by:Alkali_Guy
ID: 17793575
Subclass the listview control, e.g. as "CScrollListView."  Assign a pointer to a member of the class, pointing to the other control.  When you receive the WM_VSCROLL message in the object (OnVScroll handler), use the Scroll method to scroll the other control to the corresponding position.  I think you can get the object's scroll position using GetOrigin.
0
 
LVL 5

Expert Comment

by:Alkali_Guy
ID: 17793578
Oops, wrong topic area.......         Yoink!
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17793679
why would one use 2 listviews instead of one if they need to be scrolled at the same time?
0
 
LVL 9

Expert Comment

by:Naveen Swamy
ID: 17794572
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question