How to remember font size changed by ctrl+mouse wheel
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I need to save font selected by user by Ctrl+MouseWheel in Winforms RichTextBox. I tried override below but this does not remember font: in this method Font.Size property seems to be always *initial* Font size when RichTextBox is created, *not* the font size set by ctrl+mouse wheel. How to find the font size set by Ctrl+Mouse wheel ? Andrus.
class MyRichTextBox : RichTextBox { protected override void OnMouseWheel(MouseEventArgs e) { base.OnMouseWheel(e); Settings.Default.TextBoxFont = new SerializableFont(Font); }
}
Andrus
-
I need to save font selected by user by Ctrl+MouseWheel in Winforms RichTextBox. I tried override below but this does not remember font: in this method Font.Size property seems to be always *initial* Font size when RichTextBox is created, *not* the font size set by ctrl+mouse wheel. How to find the font size set by Ctrl+Mouse wheel ? Andrus.
class MyRichTextBox : RichTextBox { protected override void OnMouseWheel(MouseEventArgs e) { base.OnMouseWheel(e); Settings.Default.TextBoxFont = new SerializableFont(Font); }
}
Andrus