private void button1_Click(object sender, EventArgs e)
{
this.listView1.View = View.Details;
this.listView1.Scrollable = true;
this.listView1.MultiSelect = false;
this.listView1.HeaderStyle = ColumnHeaderStyle.Nonclickable;
this.listView1.Columns.Add("Items", 60, HorizontalAlignment.Right);
this.listView1.Columns.Add("Value", 100, HorizontalAlignment.Left);
this.listView1.Visible =true;
for (int e1 = 1; e1 <= 2; e1++)
{
ListViewItem lv = new ListViewItem();
lv.SubItems[0].Text = "a";
lv.SubItems.Add("3");
this.listView1.Items.Add(lv);
}
}
private void button2_Click(object sender, EventArgs e)
{
string[] aaa = { "aa", "bb", "cc" };
this.listBox1.Items.AddRange(aaa);
}
private void button3_Click(object sender, EventArgs e)
{
ArrayList aab = new ArrayList();
aab.Add(98);
aab.Add(87);
aab.Add("cc");
this.listBox1.Items.AddRange(aab.ToArray());
}