Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MultiColumn ListBox
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00970814
Message ID:
00970857
Vues:
21
Dave,
That is not the behaviour I see when I change the listbox to multicolumn = true and columnwidth = 200, I see a listbox with the following content:
Line 0
Line 1
Line 2
Line 3
after running the following code:
for (int i = 0; i<4; i+++)
{
  this.listBox1.Items.Add("Line "+i.ToString());
}
In other words I only get one column.
I will look more into it tomorrow since I do not have VS.NET on this computer.

Einar

>I might be mistaken but I think you misunderstand what the multicolumn listbox does. It snakes the single column like this:
>
>Line0 Line2
>Line1 Line3
>
>I think you can use a ListView to do what you want (show multiple columns on a single line).
>
>
>>When I have a simple form with a ListBox where MultiColumn = false I can use the following code to add items to the listbox:
>>
>>this.listBox1.Items.Add("Line 0");
>>this.listBox1.Items.Add("Line 1");
>>this.listBox1.Items.Add("Line 2");
>>
>>
>>Now lets say I want to get a little bit more advanced and use a ListBox where MultiColumn = true. Can I use similar code to populate 2 or maybe 3 columns in the listbox or do I have to add my data to a datatable and then bind the datatable to the ListBox?
>>
>>
>>Thanks,
>>Einar
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform