[Mono-bugs] [Bug 78813][Nor] Changed - ListTextBox: Items are not sorted with Sorted=true

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jul 10 19:34:52 EDT 2006


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 peter at novonyx.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78813

--- shadow/78813	2006-07-10 19:22:11.000000000 -0400
+++ shadow/78813.tmp.30899	2006-07-10 19:34:52.000000000 -0400
@@ -29,6 +29,35 @@
 In .Net the items are sorted as expected.
 
 ------- Additional Comments From unserkonig at gmail.com  2006-07-10 19:22 -------
 Sample code at: http://pastebin.ca/84435 
 (Observe that setting ListBox.Sorted AFTER adding them works as
 expected, with the items sorted).
+
+------- Additional Comments From peter at novonyx.com  2006-07-10 19:34 -------
+// sample
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Collections;
+
+public class TestForm : Form
+{
+        static void Main ()
+        {
+                TestForm form = new TestForm ();
+                Application.Run (form);
+        }
+
+        public TestForm ()
+        {
+                ListBox listbox = new ListBox ();
+                listbox.Parent = this;
+                listbox.Location = new Point (5, 5);
+
+                listbox.Sorted = true; // Comment this for second case
+                listbox.Items.AddRange (new string [] 
+{"Bill", "Jeff", "Albert"});
+                //listbox.Sorted = true; // Uncomment this for second 
+case
+        }
+}


More information about the mono-bugs mailing list