Mojo
2009-07-05 13:07:06 UTC
Hi All
Hope I explain this OK!
Basically I've got one listbox (incorporating checkboxes) that overlaps
another so that the following display is shown:
[ ] [ ] Cats
[ ] [ ] Dogs
[ ] [ ] Horses
[ ] [ ] Sheep
etc... etc..
The reason for this is so that the user can use the 1st column of checkboxes
to include particular people and the 2nd one to exclude them.
To try and keep both listboxes in sync when the user uses the top listbox's
scrollbar to go up and down I use the following code:
Private Sub lsbInitMenuList_Scroll(Index As Integer)
lsbInitMenuList(0).TopIndex = lsbInitMenuList(1).TopIndex
End Sub
Now I originally tested this on 3 x WinXP machines and it works fine, but
I've run it on a couple more XP machines and Vista machines and the
scrollbar scrolling makes the list go wappie!
The underneath listbox doesn't seem to move as the top listbox starts to go
down and then the app seems to catch up to put them back into sync. Having
tried it on a Vista machine a few minutes go the listboxes do eventually
line up again, but the wappie-ness of the entries go up-and-down and out of
sync looks pants and unprofessional. Is there anyway I can make this
smoother??
Thanks
Hope I explain this OK!
Basically I've got one listbox (incorporating checkboxes) that overlaps
another so that the following display is shown:
[ ] [ ] Cats
[ ] [ ] Dogs
[ ] [ ] Horses
[ ] [ ] Sheep
etc... etc..
The reason for this is so that the user can use the 1st column of checkboxes
to include particular people and the 2nd one to exclude them.
To try and keep both listboxes in sync when the user uses the top listbox's
scrollbar to go up and down I use the following code:
Private Sub lsbInitMenuList_Scroll(Index As Integer)
lsbInitMenuList(0).TopIndex = lsbInitMenuList(1).TopIndex
End Sub
Now I originally tested this on 3 x WinXP machines and it works fine, but
I've run it on a couple more XP machines and Vista machines and the
scrollbar scrolling makes the list go wappie!
The underneath listbox doesn't seem to move as the top listbox starts to go
down and then the app seems to catch up to put them back into sync. Having
tried it on a Vista machine a few minutes go the listboxes do eventually
line up again, but the wappie-ness of the entries go up-and-down and out of
sync looks pants and unprofessional. Is there anyway I can make this
smoother??
Thanks