[Mono-bugs] [Bug 72252][Wis] New - ListView is not being cleared.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 5 Feb 2005 18:36:44 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by rogerio.araujo@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=72252
--- shadow/72252 2005-02-05 18:36:44.000000000 -0500
+++ shadow/72252.tmp.16521 2005-02-05 18:36:44.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 72252
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rogerio.araujo@gmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListView is not being cleared.
+
+If i fill the listview with some data and the clear all the listview, the
+listview is only cleared is i add a new item after call ListView.Items.Clear();
+
+By example:
+
+//Doesn't works:
+DirectoryInfo dirInfo = new DirectoryInfo(path);
+DirectoryInfo[] dirs = dirInfo.GetDirectories();
+foreach(DirectoryInfo dir in dirs)
+{
+ //lbxLocalFileSystem.Items.Add("./" + dir.Name);
+ lviItem = new ListViewItem("./" + dir.Name);
+ lviItem .SubItems.Add("");
+ lviItem .SubItems.Add(dir.Attributes.ToString());
+ lvwLocalFileSystem.Items.Add(lviItem) ;
+}
+lvwRemoteFileSystem.Items.Clear();
+
+//Works:
+DirectoryInfo dirInfo = new DirectoryInfo(path);
+DirectoryInfo[] dirs = dirInfo.GetDirectories();
+foreach(DirectoryInfo dir in dirs)
+{
+ //lbxLocalFileSystem.Items.Add("./" + dir.Name);
+ lviItem = new ListViewItem("./" + dir.Name);
+ lviItem .SubItems.Add("");
+ lviItem .SubItems.Add(dir.Attributes.ToString());
+ lvwLocalFileSystem.Items.Add(lviItem) ;
+}
+lvwRemoteFileSystem.Items.Clear();
+lviItem = new ListViewItem("nothing");
+lviItem .SubItems.Add("");
+lviItem .SubItems.Add(dir.Attributes.ToString());
+lvwLocalFileSystem.Items.Add(lviItem) ;