private void SetupMyMultiColumn()
{
// Add items to the ListBox.
for (int x = 0; x < 50; x++)
{
listBox1.Items.Add("Items " + x.ToString());
}
// Display items in columns.
listBox1.MultiColumn = true;
// Determine the width of the items in the list to get the best column width setting.
int width = (int) listBox1.CreateGraphics().MeasureString(listBox1.Items[listBox1.Items.Count -1].ToString(),
listBox1.Font).Width;
// Set the column width based on the width of each item in the list.
listBox1.ColumnWidth = width;
}