zoukankan      html  css  js  c++  java
  • Listview操作

      设置

       listView1.VirtualMode = true;
       listView1.RetrieveVirtualItem += ListView1_RetrieveVirtualItem;

        private void ListView1_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
            {
                e.Item = MyListView[e.ItemIndex];
            }

           List<ListViewItem> ListView = new List<ListViewItem>();

                        ListViewItem item = new ListViewItem();
                        item.Text = i.ToString();
                        item.SubItems.Add(temp[0]);
                        item.SubItems.Add(temp[1]);
                        item.SubItems.Add(temp[2]);
                        item.SubItems.Add(temp[3]);
                        item.SubItems.Add("等待任务");
                        ListView.Add(item);

               this.Invoke(new EventHandler(delegate
                {
                    listView1.VirtualListSize = MyListView.Count;
                    listView1.Invalidate();
                }));

               //滚动listview

                this.Invoke(new EventHandler(delegate
                    {
                        MyListView[Listview_index].EnsureVisible();
                    }));

    System.Threading.Interlocked.Increment(ref NowThread);

  • 相关阅读:
    Go:获取命令行参数
    Go:文件操作
    Go:类型断言
    GO:interface
    Go:面向"对象"
    Go:工厂模式
    layui中流加载layui.flow
    js显示当前时间
    layui中的分页laypage
    layui中的多图上传
  • 原文地址:https://www.cnblogs.com/qc-id-01/p/8574332.html
Copyright © 2011-2022 走看看