[RESOLVED] Problem with RichTextBox zoom factor.
Hi all, I have a problem with the RichTextBox on my form. The problem is that the zoom factor of the RichTextBox control does not work if I call the "Display()" sub more than ones. Does any one know what would be the problem? Here is the sub I am using to set the text on the control.
VB Code:
Private Sub Display()
' Enable users to select entire word when double clicked.
DisplayRTB.AutoWordSelection = True
' Clear contents of control.
DisplayRTB.Clear()
' Set the text for the control.
DisplayRTB.SelectedText = "Alpha Bravo Charlie Delta Echo Foxtrot"
' Zoom by 4 points.
DisplayRTB.ZoomFactor = CSng(4)
End Sub
Re: Problem with RichTextBox zoom factor.
I resolved this problem and decided to post the solution for anyone that might need it. This is a very weird problem and it might be considered to be fixed in the future V.S. versions. The solution was solved by setting the RichTextBox.ZoomFactor property to 1 after the RichTextBox.Clear method call and then setting the RichTextBox.ZoomFactor to any number.
VB Code:
Private Sub Display()
' Enable users to select entire word when double clicked.
DisplayRTB.AutoWordSelection = True
' Clear contents of control.
DisplayRTB.Clear()
[B] DisplayRTB.ZoomFactor = CSng(1)[/B]
' Set the text for the control.
DisplayRTB.SelectedText = "Alpha Bravo Charlie Delta Echo Foxtrot"
' Zoom by 4 points.
DisplayRTB.ZoomFactor = CSng(4)
End Sub
Re: [RESOLVED] Problem with RichTextBox zoom factor.
Well done... :wave:
Regards,
Re: Problem with RichTextBox zoom factor.
Well done, it works.
With hundreds of programmers in Microsoft its people like you who find nasty bugs!!
Thanks.
Re: [RESOLVED] Problem with RichTextBox zoom factor.
2021 !!!
The bug still exists on C# (which is .Net too)
disgusting..