How preserve fontsize of 2 Richtextbox or equal sizes
A R C
1
Reputation point
I have 2 richtextboxes, I increase the font size of both correctly at same time with a button with this code. The problem is: when I zoom directly on touchscreen and/or I do accidentally 2-fingered zoom on the touchpad, over one of them, it zooms too, but then I can't get back equal values pressing the button, both textboxes get diferent font size. Clicking the button continues to increase 1 point each text, but at different sizes, I must adjust manually, (doing zoom again in the same way at 2 fingers) to get back the nearest size in the moddified one.
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, RichTextBox1.Font.Size + 1,RichTextBox1.Font.Style)
- RichTextBox2.Font = RichTextBox1.Font
- End Sub
Sign in to answer