[Mono-bugs] [Bug 79588][Blo] Changed - [PATCH] ComboBox: ArgumentOutOfRangeException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Oct 11 20:22:26 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 alex.olk at googlemail.com.

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

--- shadow/79588	2006-10-11 15:28:12.000000000 -0400
+++ shadow/79588.tmp.13217	2006-10-11 20:22:26.000000000 -0400
@@ -198,6 +198,20 @@
  			}
 
 
 ------- Additional Comments From mkestner at ximian.com  2006-10-11 15:28 -------
 You only need the first check.  It's only the clear of the old value
 that can be out of range.  Please commit.  Thanks.
+
+------- Additional Comments From alex.olk at googlemail.com  2006-10-11 20:22 -------
+Attached is a new patch for this bug.
+
+It is much better to reset some combolistbox values to default when
+ComboBox.Items.Clear is getting called.
+
+Next thing that really fixed it was to replace all occurences of
+"value" to "selected_index" in "public override int SelectedIndex".
+The weird thing was, that during runtime without leaving the scope of
+the SelectedIndex property "value" changed its value. Never seen this
+before. 
+For example, initially value was 8 (selected_index = value;) and when
+"listbox_ctrl.HighlightedIndex = value;" got called value changed to 13.


More information about the mono-bugs mailing list