Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...
this.listBox3.Items.AddRange(new object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });
It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?
Ignacio Machin ( .NET/ C# MVP ) - 22 Oct 2007 15:48 GMT
Hi,
Each object is a comma separated list of values so I assume that the listbox
expect that you define the columns that way.
You failed to mention if this is a web or a win example ( I assume that a
window)

Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
> Hello
> I want to have a multicolumn listbox. I never used one before
[quoted text clipped - 16 lines]
> example! What is there that results in a two column list with 5 lines
> in column 1 and 3 lines in column 2?
WRH - 22 Oct 2007 16:13 GMT
Thanks for the quick reply.
Further testing shows that the last 3 items went into column 2 only
because of the height of the listBox (No vertical scroll) What I want
is to specify the column for an item.
Using windows forms, MS VC# 2005 express edition
> Hi,
>
[quoted text clipped - 24 lines]
>> example! What is there that results in a two column list with 5 lines
>> in column 1 and 3 lines in column 2?
Ignacio Machin ( .NET/ C# MVP ) - 22 Oct 2007 18:12 GMT
Hi,
You have to read the docs and see what format ListBox expect for
multicolumns lists.
I just found the txt:
A multicolumn ListBox places items into as many columns as are needed to
make vertical scrolling unnecessary. The user can use the keyboard to
navigate to columns that are not currently visible. Set the
HorizontalScrollbar property to true to display a horizontal scroll bar that
enables the user to scroll to columns that are not currently shown in the
visible region of the ListBox. The value of the ColumnWidth property
determines the width of each column.

Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
> Thanks for the quick reply.
> Further testing shows that the last 3 items went into column 2 only
[quoted text clipped - 31 lines]
>>> example! What is there that results in a two column list with 5 lines
>>> in column 1 and 3 lines in column 2?
WRH - 22 Oct 2007 21:54 GMT
Thanks again for the info.
I have decided to use ListView instead, as it seems much
more manageable with regard to columns.
I could not be sure what the user may see at any given
time with a multicolumn ListBox!
> Hi,
>
[quoted text clipped - 45 lines]
>>>> example! What is there that results in a two column list with 5 lines
>>>> in column 1 and 3 lines in column 2?
Ignacio Machin ( .NET/ C# MVP ) - 23 Oct 2007 18:49 GMT
Hi,

Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
> Thanks again for the info.
>
[quoted text clipped - 3 lines]
> I could not be sure what the user may see at any given
> time with a multicolumn ListBox!
Wise decision, Listview is the control for that.