Discussion:
RichTextBox Help
(too old to reply)
Simon Fletcher
2003-10-05 20:40:36 UTC
Permalink
Right, what i want to do is have a HARD RETURN in a Textbox or RichTextBox,
so after i press a button or whatever it shows this:

"blah blah blah
blah blah"

Is there any special charactor to do this?

Can anyone help?

Simon Fletcher
Dr Hangman
2003-10-06 20:17:42 UTC
Permalink
That is no problem...

just look at the properties for the TextBox or Rich Text Box and change
MultiLine to True

Dr Hangman
Post by Simon Fletcher
Right, what i want to do is have a HARD RETURN in a Textbox or
RichTextBox,
Post by Simon Fletcher
"blah blah blah
blah blah"
Is there any special charactor to do this?
Can anyone help?
Simon Fletcher
Simon Fletcher
2003-10-08 18:09:11 UTC
Permalink
i did that, but i want it so that you don't need to go to the end of text
box to change lines, so wen i press a button i can add text of diff lines
Post by Dr Hangman
That is no problem...
just look at the properties for the TextBox or Rich Text Box and change
MultiLine to True
Dr Hangman
Post by Simon Fletcher
Right, what i want to do is have a HARD RETURN in a Textbox or
RichTextBox,
Post by Simon Fletcher
"blah blah blah
blah blah"
Is there any special charactor to do this?
Can anyone help?
Simon Fletcher
Dr Hangman
2003-10-08 18:22:33 UTC
Permalink
if you could, tell me exactly what you are trying to do...
all I know is to use multiline and use enter to switch lines...

if you want another key, you can use the keypress method and assign a key to
add Chr(13) & Chr(10)

replace x with the desired key

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = x Then
Text1.Text = Text1.Text & Chr(13) & Chr(10)
KeyAscii = 0
End If
End Sub

But I don't think this is neccessary and I really don't see what it is you
want to do...

Dr Hangman
Post by Simon Fletcher
i did that, but i want it so that you don't need to go to the end of text
box to change lines, so wen i press a button i can add text of diff lines
Post by Dr Hangman
That is no problem...
just look at the properties for the TextBox or Rich Text Box and change
MultiLine to True
Dr Hangman
Post by Simon Fletcher
Right, what i want to do is have a HARD RETURN in a Textbox or
RichTextBox,
Post by Simon Fletcher
"blah blah blah
blah blah"
Is there any special charactor to do this?
Can anyone help?
Simon Fletcher
Loading...