i have a multi line textbox which i am using for a Notepad-like text editor. In my program, i included a button for toggling word wrap on and off. The problem is, whenever i change the word wrap property of my text box, the font style used by the text inside it changes! I am using a font that is installed in the font folder of windows, i have no problems with it, so i guess the problem is not because of the font, but because of the program itself. I even tried to specificaly define the font to use, after the word wrap command, like this:
Private Sub FlatButton22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FlatButton22.Click
If FlatButton22.Text = "WORD WRAP" Then
FlatButton22.Text = "WORD WRAP OFF"
doc.WordWrap = True
doc.Font = New Font("lcars", 16, FontStyle.Regular)
ElseIf FlatButton22.Text = "WORD WRAP OFF" Then
FlatButton22.Text = "WORD WRAP"
doc.WordWrap = False
doc.Font = New Font("lcars", 16, FontStyle.Regular)
End If
End Sub
but it still not working, and as soon as i click the wordwrap button, the font of the textbox changes. I dont know why this is happening, but its already driving me out of my minds, because i really need to use that specifical font! thank you in advance for any suggestions!
This post has been edited by rusoaica: 07 August 2012 - 11:05 AM

New Topic/Question
Reply




MultiQuote






|