zoukankan      html  css  js  c++  java
  • listView or listBox

        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());
            }

  • 相关阅读:
    eWebEditor在ie9下按钮功能失效的解决办法
    FLV视频播放代码
    笔记 PHP常用 语句
    jquery 无刷新加载执行,显示数据
    常用的PHP与SQL语句
    PHP常用语句
    Ajax+php 无刷新更新数据.并将数据库操作改写成类.
    js下拉框联动代码
    PHP 更新功能 笔记
    MyEclipse8.5开发环境配置中SVN插件安装重点解析
  • 原文地址:https://www.cnblogs.com/greencolor/p/1590616.html
Copyright © 2011-2022 走看看