Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Two listboxes - VB6  (Read 1653 times)

0 Members and 1 Guest are viewing this topic.

Nightmare03

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 195
  • Last login:August 18, 2007, 07:20:34 am
  • Stupid llama!
Two listboxes - VB6
« 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?

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 8187
  • Last login:Today at 04:27:05 pm
  • The Bears Still Suck!
Re:Two listboxes - VB6
« Reply #1 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.

Nightmare03

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 195
  • Last login:August 18, 2007, 07:20:34 am
  • Stupid llama!
Re:Two listboxes - VB6
« Reply #2 on: January 25, 2004, 08:10:46 pm »
Yeh they would be a equal amount in each box.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:April 28, 2025, 12:29:02 am
Re:Two listboxes - VB6
« Reply #3 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.
« Last Edit: January 25, 2004, 09:21:27 pm by Jakobud »

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 8187
  • Last login:Today at 04:27:05 pm
  • The Bears Still Suck!
Re:Two listboxes - VB6
« Reply #4 on: January 25, 2004, 10:37:53 pm »
again, what are you trying to do?  I'm sure there is a better way.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Two listboxes - VB6
« Reply #5 on: January 26, 2004, 04:17:18 am »
Nightmare03 did you visit fe.donkeyfly.com?  That is the place for this kindof stuff really...

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 24, 2025, 10:25:04 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Two listboxes - VB6
« Reply #6 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.)

Dave Butler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • Last login:October 27, 2016, 03:31:16 pm
  • What does this button do?
    • MAMEWAH Setup
Re:Two listboxes - VB6
« Reply #7 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.