Solved

scrolling two listview controls simultanesouly.

Posted on 2006-10-23
5
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 86

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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