The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Nightmare03 on January 25, 2004, 07:41:39 pm

Title: Two listboxes - VB6
Post by: Nightmare03 on January 25, 2004, 07:41:39 pm
I was wondering, is it possible to have 2 listboxes in visual basic and when you scroll on the one box, it makes the other one scroll in the same direction?
Title: Re:Two listboxes - VB6
Post by: SirPoonga on January 25, 2004, 07:52:31 pm
what are you trying to do?
In order for something like that to even be possible each list would have to have the same amount of items.  If that is the case maybe you want to use a ListView instead.
Title: Re:Two listboxes - VB6
Post by: Nightmare03 on January 25, 2004, 08:10:46 pm
Yeh they would be a equal amount in each box.
Title: Re:Two listboxes - VB6
Post by: Jakobud on January 25, 2004, 09:20:39 pm
After the user selects an item in the listbox, query what number item he selected.  Then select that same number item in the other list box.

If you are wanting them to both scroll syncronously in realtime... then... don't ask me.
Title: Re:Two listboxes - VB6
Post by: SirPoonga on January 25, 2004, 10:37:53 pm
again, what are you trying to do?  I'm sure there is a better way.
Title: Re:Two listboxes - VB6
Post by: Minwah on January 26, 2004, 04:17:18 am
Nightmare03 did you visit fe.donkeyfly.com?  That is the place for this kindof stuff really...
Title: Re:Two listboxes - VB6
Post by: Howard_Casto on January 26, 2004, 09:24:32 am
Nightmare03 did you visit fe.donkeyfly.com?  That is the place for this kindof stuff really...

Agreed, this isn't the vb help forum, this is byoac.  (Actually neither is fe.mamehost, but i guess it's close enough.)
Title: Re:Two listboxes - VB6
Post by: Dave Butler on January 29, 2004, 05:28:57 pm
I was wondering, is it possible to have 2 listboxes in visual basic and when you scroll on the one box, it makes the other one scroll in the same direction?

It's easy.
Create List1 and List2
In List1 scroll event type this

List2.TopIndex = List1.TopIndex

Thats it. When you scroll list 1, list 2 will scroll.