Author: aolk
Date: 2006-09-24 07:55:32 -0400 (Sun, 24 Sep 2006)
New Revision: 65846
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FontDialog.cs
Log:
Also, send the FontXXXTextBox mouse wheel event to the corresponding
FontXXXListBoxes to match ms.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-09-24 10:15:28 UTC (rev 65845)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-09-24 11:55:32 UTC (rev 65846)
@@ -3,6 +3,8 @@
* FontDialog.cs: Fixed the up/down arrow keys issue from bug #79478.
It is now possible to change the selected index in a FontXXXListBox
with the up and down arrow keys from the FontXXXTextBoxes.
+ Also, send the FontXXXTextBox mouse wheel event to the corresponding
+ FontXXXListBoxes to match ms.
2006-09-22 Sebastien Pouliot <[EMAIL PROTECTED]>
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FontDialog.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FontDialog.cs
2006-09-24 10:15:28 UTC (rev 65845)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FontDialog.cs
2006-09-24 11:55:32 UTC (rev 65846)
@@ -68,9 +68,9 @@
private TextBox fontstyleTextBox;
private TextBox fontsizeTextBox;
- private ListBox fontListBox;
- private ListBox fontstyleListBox;
- private ListBox fontsizeListBox;
+ private MouseWheelListBox fontListBox;
+ private MouseWheelListBox fontstyleListBox;
+ private MouseWheelListBox fontsizeListBox;
private GroupBox effectsGroupBox;
private CheckBox strikethroughCheckBox;
@@ -180,8 +180,9 @@
fontstyleTextBox = new TextBox( );
fontsizeTextBox = new TextBox( );
- fontListBox = new ListBox( );
- fontsizeListBox = new ListBox( );
+ fontListBox = new MouseWheelListBox ();
+ fontsizeListBox = new MouseWheelListBox ();
+ fontstyleListBox = new MouseWheelListBox ();
fontLabel = new Label( );
fontstyleLabel = new Label( );
@@ -189,7 +190,6 @@
scriptLabel = new Label( );
exampleGroupBox = new GroupBox( );
- fontstyleListBox = new ListBox( );
effectsGroupBox = new GroupBox( );
underlinedCheckBox = new CheckBox( );
@@ -401,6 +401,10 @@
fontstyleTextBox.KeyDown += new KeyEventHandler
(OnFontStyleTextBoxKeyDown);
fontsizeTextBox.KeyDown += new KeyEventHandler
(OnFontSizeTextBoxKeyDown);
+ fontTextBox.MouseWheel += new MouseEventHandler
(OnFontTextBoxMouseWheel);
+ fontstyleTextBox.MouseWheel += new MouseEventHandler
(OnFontStyleTextBoxMouseWheel);
+ fontsizeTextBox.MouseWheel += new MouseEventHandler
(OnFontSizeTextBoxMouseWheel);
+
Font = form.Font;
}
#endregion // Public Constructors
@@ -875,6 +879,21 @@
bool internal_textbox_change = false;
+ void OnFontTextBoxMouseWheel (object sender, MouseEventArgs e)
+ {
+ fontListBox.SendMouseWheelEvent (e);
+ }
+
+ void OnFontStyleTextBoxMouseWheel (object sender,
MouseEventArgs e)
+ {
+ fontstyleListBox.SendMouseWheelEvent (e);
+ }
+
+ void OnFontSizeTextBoxMouseWheel (object sender, MouseEventArgs
e)
+ {
+ fontsizeListBox.SendMouseWheelEvent (e);
+ }
+
void OnFontTextBoxKeyDown (object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up) {
@@ -1248,5 +1267,13 @@
remove { Events.RemoveHandler (EventApply, value); }
}
}
+
+ internal class MouseWheelListBox : ListBox
+ {
+ public void SendMouseWheelEvent(MouseEventArgs e)
+ {
+ OnMouseWheel (e);
+ }
+ }
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches