Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog6
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs17
2 files changed, 15 insertions, 8 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index c92ecc6657e..1b37c213658 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-20 Mike Kestner <mkestner@novell.com>
+
+ * ComboBox.cs: setup LargeChange on the scrollbar. Invoke FireMouseUp
+ in the MouseUp handler of the listbox and move the return handling
+ code to FireMouseUp to avoid scrolling on ups. Fixes #79952.
+
2006-11-20 Everaldo Canuto <everaldo@simios.org>
* Toolbar.cs: Ignore right mouse clicks in toolbar. Fixes #79855.
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
index 37442208f65..82eefc9a791 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
@@ -1516,25 +1516,25 @@ namespace System.Windows.Forms
set { }
}
- public bool FireMouseDown (MouseEventArgs e)
+ public void FireMouseDown (MouseEventArgs e)
{
if (Visible) {
e = TranslateEvent (e);
- if (ClientRectangle.Contains (e.X, e.Y)) {
+ if (ClientRectangle.Contains (e.X, e.Y))
OnMouseDown (e);
- return true;
- }
}
- return false;
}
- public void FireMouseUp (MouseEventArgs e)
+ public bool FireMouseUp (MouseEventArgs e)
{
if (Visible) {
e = TranslateEvent (e);
- if (ClientRectangle.Contains (e.X, e.Y))
+ if (ClientRectangle.Contains (e.X, e.Y)) {
OnMouseUp (e);
+ return true;
+ }
}
+ return false;
}
public void FireMouseMove (MouseEventArgs e)
@@ -1661,6 +1661,7 @@ namespace System.Windows.Forms
vscrollbar_ctrl.Location = new Point (width - vscrollbar_ctrl.Width - BorderWidth - 1, 0);
vscrollbar_ctrl.Maximum = owner.Items.Count - (owner.DropDownStyle == ComboBoxStyle.Simple ? page_size : owner.maxdrop_items);
+ vscrollbar_ctrl.LargeChange = owner.MaxDropDownItems - 1;
show_scrollbar = vscrollbar_ctrl.Visible = true;
int hli = HighlightedIndex;
@@ -1825,7 +1826,7 @@ namespace System.Windows.Forms
int index = IndexFromPointDisplayRectangle (e.X, e.Y);
if (index == -1) {
- if (vscrollbar_ctrl == null || !vscrollbar_ctrl.FireMouseDown (e))
+ if (vscrollbar_ctrl == null || !vscrollbar_ctrl.FireMouseUp (e))
HideWindow ();
} else {
owner.SelectedIndex = index;