* ListBox.cs: Fixes navigation to the last item in multicolumn lists
svn path=/trunk/mcs/; revision=50746
+2005-09-26 Jordi Mas i Hernandez <jordi@ximian.com>
+
+ * ListBox.cs: Fixes navigation to the last item in multicolumn lists
+
2005-09-25 Jackson Harper <jackson@ximian.com>
* TreeView.cs: Update the node bounds correctly regardless of
private void UpdatedTopItem ()
{
- if (multicolumn) {
- int col = (LBoxInfo.top_item / LBoxInfo.page_size);
- hscrollbar_ctrl.Value = col;
- }
+ if (multicolumn) {
+ int col = LBoxInfo.top_item / LBoxInfo.page_size;
+
+ if (col > hscrollbar_ctrl.Maximum)
+ hscrollbar_ctrl.Value = hscrollbar_ctrl.Maximum;
+ else
+ hscrollbar_ctrl.Value = col;
+ }
else {
if (LBoxInfo.top_item > vscrollbar_ctrl.Maximum)
vscrollbar_ctrl.Value = vscrollbar_ctrl.Maximum;