Solved

scrolling two listview controls simultanesouly.

Posted on 2006-10-23
5
280 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
Comment Utility
0
 
LVL 5

Expert Comment

by:Alkali_Guy
Comment Utility
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
Comment Utility
Oops, wrong topic area.......         Yoink!
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now