How can I get rid of the wordwrap on a richtextbox but still allow the user to make a hard return and goto the next line? I tried making the rightmargin property a huge number, but it acts the same.
Printable View
How can I get rid of the wordwrap on a richtextbox but still allow the user to make a hard return and goto the next line? I tried making the rightmargin property a huge number, but it acts the same.
when i worked with the richtextbox i had no problem with the wordwrap
i actually needed to set the right margin to a large number to get a wordwrap ... if the right margin is set to zero than you won't get a wordwrap and you should be able to press enter
my right margin is set to zero and trust me, theres wordwrap, can anyone help?
:(
I can use this too. :)
I dont know about anyone else, but that won't let me reactivate wordwrap once its disabled :confused:
Anyway its ok, I found this. (Works much better in my opinion)
http://www.developerfusion.com/show/16/10/
I just changed the select case to this:
Because I don't want WYSIWYG and its shorter :pVB Code:
SendMessageLong frmText.txtData.hwnd, EM_SETTARGETDEVICE, 0, 1 - chkWordWrap.Value
I have one question about Constants though...
In this code there are these two constants:
VB Code:
Public Const WM_USER = &H400 Public Const EM_SETTARGETDEVICE = (WM_USER + 72)
Why not just replace "EM_SETTARGETDEVICE" with "(&H400 + 72)", if it didn't work that way I would understand, but it DOES work that way :eek: