Connecting Tech Pros Worldwide Forums | Help | Site Map

Mutiple Listbox Scroll

OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 361
#1: Jul 22 '09
I have 2 listboxes next to each other...
Is it possible to scroll both simultaneoulsy ???

smartchap's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Lucknow, India
Posts: 194
#2: Jul 24 '09

re: Mutiple Listbox Scroll


Yes it is possible and I have done it. But at present I don't remember the code. I used MouseMove property and ItemIndex, etc. As soon as I solve it I will tell u.
CyberSoftHari's Avatar
Expert
 
Join Date: Sep 2007
Location: Banglore, India.
Posts: 450
#3: Jul 25 '09

re: Mutiple Listbox Scroll


List box control is a single column control, you can Add ListView from components for multi column.
smartchap's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Lucknow, India
Posts: 194
#4: Jul 25 '09

re: Mutiple Listbox Scroll


With the use of below lines

Expand|Select|Wrap|Line Numbers
  1. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
  2.  
  3. Private Const LB_ITEMFROMPOINT = &H1A9
  4.  
you can check mouse pointer is above which item in one list box and then select that item in that list box and corresponding index item in the other listbox.
Reply