Private void InitListView () {# region adds the Item topic. There are three columns // 1 and region creation topic. There are three columns in total: listView1.View = View. details; listView1.Columns. add ("file name"); listView1.Columns. add ("size"); listView1.Columns. add ("creation date"); listView1.BeginUpdate (); # Add the first Item in region // 2. Define a ListViewItem in View. in Details mode, it is like a value in the first column ListViewItem lvItem; // 3. Define ListViewSubItem in View. in Details mode, it is a bit like a value in the second column ListViewItem. listViewSubItem lvSubItem; // list an Item in View. detail In s mode, the point is like adding the first value of the first line lvItem = new ListViewItem (); // The text lvItem displayed by the Item. text = "file lifecycle 1"; // 4. Add Item to the ListView control, that is, add the first line. In View. in Details mode, the first value of listView1.Items is added to the first column of the First intent. add (lvItem); // practically SubItemlvSubItem = new ListViewItem. listViewSubItem (); lvSubItem. text = "10"; // 5. Add the SubItem to the first Item. in Details mode, it is a bit like adding the first lvItem in the second column of the first category. subItems. add (lvSubItem); lvSubItem = new ListViewItem. listViewSubItem (); lvSubItem. text = "20080114"; // Add the SubItem to the first Item. in Details mode, it is a bit like adding the first lvItem in the third column of the first category. subItems. add (lvSubItem); # endregionlvItem = new ListViewItem (); lvItem. text = "file limit 2"; lvSubItem = new ListViewItem. listViewSubItem (); lvSubItem. text = "20"; lvItem. subItems. add (lvSubItem); lvSubItem = new ListViewItem. listViewSubItem (); lvSubItem. text = "20080115"; lvItem. subItems. add (lvSubItem); listView1.Items. add (lvItem); # endregionlistView1.EndUpdate ();}
650) this. width = 650; "title =" qq 30812232203.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/20093B639-0.jpg "/>,
This article is from the "Feng qing yang song" blog, please be sure to keep this source http://2309998.blog.51cto.com/2299998/1271670