|
-
Jun 26th, 2000, 06:37 PM
#1
Thread Starter
Addicted Member
is it possible to scroll one list box and at the same time scroll another..........
This would work two way to the list boxes are appear joined?
-
Jun 26th, 2000, 06:49 PM
#2
Hyperactive Member
You can use various api calls to set the top visible index (post a message with LB_SETTOPINDEX) etc. Is this the sort of thing your after?
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Jun 26th, 2000, 06:51 PM
#3
Thread Starter
Addicted Member
I think it is any idea what the api is
thats right, any idea what the api call is?
-
Jun 26th, 2000, 07:04 PM
#4
Hyperactive Member
pardon?
if your asking what i think your saying then...
There are a bunch of messages you can send to windows using the api calls PostMessage and SendMessage, i.e.
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
where...
hwnd: is the handle of your listbox
wMsg: is the message you will send
( e.g. declare the message LB_SETTOPINDEX by
Const LB_SETTOPINDEX = &H197 )
wParam: is the entry (index - zero based) of the entry you want to appear at the top of the listbox
lParam: set to zero
There are a bunch of other messages you can also use to have more control.
Hope this helps.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Jun 26th, 2000, 07:06 PM
#5
Fanatic Member
Someone asked this question a while ago, and this was the answer. Not mine i might add. 
use the TopIndex property. If the lists do not have the same number of items you will need to make sure the topindex is not greater than the listcount.
Otherwise, two identical lists will scroll together perfectly.
Code:
Private Sub List1_Scroll()
List2.TopIndex = List1.TopIndex
End Sub
Private Sub List2_Scroll()
List1.TopIndex = List2.TopIndex
End Sub
Iain, thats with an i by the way!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|