diff options
author | Mike Kestner <mkestner@gmail.com> | 2006-11-20 19:38:45 +0300 |
---|---|---|
committer | Mike Kestner <mkestner@gmail.com> | 2006-11-20 19:38:45 +0300 |
commit | d248fd10a12d2624fa427721ed6d257c887312e0 (patch) | |
tree | 615263ca8bffa432da5a02d5cde6e76aac9da778 /mcs | |
parent | 1bc96cac2629b6198edf14a5eb8861ad5e1e5899 (diff) |
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.
svn path=/trunk/mcs/; revision=68202
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs | 17 |
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; |