[Mono-bugs] [Bug 80696][Maj] Changed - '-1' is causing ArgumentException for ListBox
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Feb 7 08:59:41 EST 2007
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 georgegiolfan at yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80696
--- shadow/80696 2007-02-01 06:42:40.000000000 -0500
+++ shadow/80696.tmp.22402 2007-02-07 08:59:41.000000000 -0500
@@ -39,6 +39,28 @@
Unselect ListBox
How often does this happen?
Additional Information:
+
+------- Additional Comments From georgegiolfan at yahoo.com 2007-02-07 08:59 -------
+If I understand correctly, top_index is the index of the first
+visible item. If this is the case, setting it to -1 does not make
+sense. I propose changing ListBox.SelectedIndex so that
+ if (value < top_index)
+ {
+ top_index = value;
+ UpdateTopItem ();
+ } else {
+ int rows = items_area.Height
+/ ItemHeight;
+ if (value >= (top_index +
+rows))
+ {
+ top_index = value -
+rows + 1;
+ UpdateTopItem ();
+ }
+ }
+is executed only if value is not -1.
+
More information about the mono-bugs
mailing list