Results 1 to 7 of 7

Thread: wordwrap & richtextbox

  1. #1

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197

    wordwrap & richtextbox

    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.
    retired member. Thanks for everything

  2. #2
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305

    u want to get rid of the word wrap

    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

  3. #3
    Addicted Member
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    134
    my right margin is set to zero and trust me, theres wordwrap, can anyone help?

  4. #4
    Addicted Member
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    134

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

  6. #6
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Connecticut, USA
    Posts
    308
    I can use this too.

  7. #7
    Addicted Member
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    134
    I dont know about anyone else, but that won't let me reactivate wordwrap once its disabled

    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:
    VB Code:
    1. SendMessageLong frmText.txtData.hwnd, EM_SETTARGETDEVICE, 0, 1 - chkWordWrap.Value
    Because I don't want WYSIWYG and its shorter

    I have one question about Constants though...
    In this code there are these two constants:
    VB Code:
    1. Public Const WM_USER = &H400
    2. 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width