Results 1 to 12 of 12

Thread: [RESOLVED] TextBox Wrap

  1. #1

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Resolved [RESOLVED] TextBox Wrap

    How can i Wrap a TextBox? When i try to do it by changing a ScroolBars value, error occures, because it is a read-only propertie. I know it's an easy one, but i just can't get it...

  2. #2
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: TextBox Wrap

    multiline = true I believe.

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

    Re: TextBox Wrap

    Set the MultiLine property to True

  4. #4

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: TextBox Wrap

    I think you don't understand me. Multiline is also a read-only property. Check Windows Notepad, Format -> Word Wrap. That's what i would like to do.

  5. #5
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: TextBox Wrap

    Still not making yourself clear...

  6. #6

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: TextBox Wrap

    Well... i know how Multiline property is working. It gives you a chance to use more than one line But... i would like to have a TextBox, which can be changed in the middle of running a program. From Multiline = True to Multiline = False and reverse. You can see that it's possible, but VB says that it's a read-only property. I would just like to know if it's doable, and if it is, how.

  7. #7
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: TextBox Wrap

    You need to set the multiline property of the textbox at design time, and then you will be able to add scrollbars. setting it at runtime will cause an error (which is what you got)

  8. #8

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: TextBox Wrap

    See i'm not making myself clear... I know how Multiline and ScrollBars properties are working. I would just like to be able to set those properties in the runtime. Is it doable?

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

    Re: TextBox Wrap

    Quote Originally Posted by gavio
    See i'm not making myself clear... I know how Multiline and ScrollBars properties are working. I would just like to be able to set those properties in the runtime. Is it doable?
    No. That setting can only be set in design for a standard VB textbox.

    You can toggle word wrap in a Richtextbox using the SendMessage API however.

  10. #10

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: TextBox Wrap

    Yes... but in my case, i can't use RichTextBox. I thought there's some API which allows this in ordinary TextBox. However, thanx.

  11. #11

  12. #12
    New Member
    Join Date
    Oct 2015
    Posts
    3

    Re: [RESOLVED] TextBox Wrap

    RightMargin property.

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