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... :rolleyes:
Printable View
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... :rolleyes:
Set the MultiLine property to True
multiline = true I believe.
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.
Still not making yourself clear...
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.
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)
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.Quote:
Originally Posted by gavio
You can toggle word wrap in a Richtextbox using the SendMessage API however.
Yes... but in my case, i can't use RichTextBox. I thought there's some API which allows this in ordinary TextBox. However, thanx.
just use two textboxes - problem solved!
RightMargin property.