if needed, instead of 0 - this should help us in the corner case where
we have more than one item but we are only partially showing 1 item.
Fixes part of #374713.
2008-05-02 Carlos Alberto Cortez <calberto.cortez@gmail.com>
svn path=/trunk/mcs/; revision=104738
+2008-05-02 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ComboBox.cs: page_size as well as vscrollbar.LargeChange should be 1
+ if needed, instead of 0 - this should help us in the corner case where
+ we have more than one item but we are only partially showing 1 item.
+ Fixes part of #374713.
+
2008-05-02 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* XplatUiX11.cs: When scrolling and detecting the obscured areas in a
}
}
- page_size = height / owner.ItemHeight;
+ page_size = Math.Max (height / owner.ItemHeight, 1);
ComboBoxStyle dropdown_style = owner.DropDownStyle;
if ((dropdown_style != ComboBoxStyle.Simple && owner.Items.Count <= owner.MaxDropDownItems)
#else
int large = (dropdown_style == ComboBoxStyle.Simple ? page_size : owner.maxdrop_items) - 1;
#endif
- if (large < 0)
- large = 0;
+ if (large < 1)
+ large = 1;
vscrollbar_ctrl.LargeChange = large;
show_scrollbar = vscrollbar_ctrl.Visible = true;