Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB6 multiple column list box

Posted on 2016-08-27
3
Medium Priority
?
41 Views
Last Modified: 2016-09-16
How to fill info into multiple columns of a list box at design time, in vb6?
0
Comment
Question by:Sia Azizi
2 Comments
 
LVL 7

Assisted Solution

by:Scobber
Scobber earned 1000 total points (awarded by participants)
ID: 41773489
its been a while for me an VB6
but it goes along the lines of
your listbox is called ListView1

you say
listview1.columnheaders.add "First"
listview1.columnheaders.add "Second"
listview1.columnheaders.add "Third"

dim x as new listviewitem
x.value = "Value One"
x.subitems(1) = "Value Two"
x.subitems(2) = "Value Three"
listview1.items.add(x)

Open in new window

0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 1000 total points (awarded by participants)
ID: 41773790
While you can have multiple columns in a listbox, you really don't want to since multicolumn listboxes are hard to work with. You should use a listview control instead. The Lisview control is a part of Microsoft Windows Common Controls-3 6.0. Here's a complete example of using a listview and adding sort arrows to the column headers.
Project1.zip
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question