Solved

VB6 multiple column list box

Posted on 2016-08-27
3
14 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
3 Comments
 
LVL 7

Assisted Solution

by:Scobber
Scobber earned 250 total points (awarded by participants)
Comment Utility
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 45

Accepted Solution

by:
Martin Liss earned 250 total points (awarded by participants)
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now