scrolling two listview controls simultanesouly.

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.
expertfanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
0
 
Alkali_GuyCommented:
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
 
Alkali_GuyCommented:
Oops, wrong topic area.......         Yoink!
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
why would one use 2 listviews instead of one if they need to be scrolled at the same time?
0
 
Naveen SwamyYash Infinite Solutions Private LimitedCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.