Multi Column ListBox

  • Thread starter Thread starter matthewtec
  • Start date Start date
M

matthewtec

I see that it is possible to have a multicolumn ListBox:

lstOne.MultiColumn = True
lstOne.ColumnWidth = 10

but the only way I have seen to have the items in the listbox print in the
next column is to add enough items to go to the bottom and then start again
at the top.

Is there any way to select which column in the ListBox I want to have an
item added to?

Thanks for any help!
m
 
I don't know if there is a rational way or not,
but in this situation I put 10 listbox beside each other,
then remove the borders and spaces, so they look like
one listbox.
 
Hi,

The listbox only supports one column. The listview control supports
multiple columns. I think that might be a better choice for you.

Ken
 
Hi,

If you really want to use a ListBox control, I think that only the .NET 2.0
version supports multiple columns:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.listbox.multicolumn.aspx

But you can use also a ListView control, take a look at the View property:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.view.aspx
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top