By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,901 Members | 1,436 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,901 IT Pros & Developers. It's quick & easy.

Cannot get chr(10) or chr(13) to show

P: n/a
I have a form I'm using as a dialog box.
It has default text that is two paragraphs.

It has a function setText(byval text as string)
that specifies the text in the read-only textbox that's on it.

For some odd reason,

dialog1.setText("Line 1" & chr(13) & chr(13) & "Line 2") shows up as
"Line 1Line 2" on Vista, and as "Line 1[]Line2" on 2k3, where [] is an
unprintable character.

The original text (default) shows up just fine.

using chrw() instead of chr() or 10 instead of 13 makes no difference.

Using + instead of & doesn't make a difference either.

Do you have any idea what is causing the enter characters to not show?
multiline is set to true.

chr(9) for tab works just fine, as do other characters.

Anyone see this before?

May 10 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Computer Guru wrote:
I have a form I'm using as a dialog box.
It has default text that is two paragraphs.

It has a function setText(byval text as string)
that specifies the text in the read-only textbox that's on it.

For some odd reason,

dialog1.setText("Line 1" & chr(13) & chr(13) & "Line 2") shows up as
"Line 1Line 2" on Vista, and as "Line 1[]Line2" on 2k3, where [] is an
unprintable character.

The original text (default) shows up just fine.

using chrw() instead of chr() or 10 instead of 13 makes no difference.

Using + instead of & doesn't make a difference either.

Do you have any idea what is causing the enter characters to not show?
multiline is set to true.
You want vbCrLF, which is the same as Chr(13) & Chr(10), which is the line
end Windows expects.

Andrew
May 10 '07 #2

P: n/a
May be this one is better " System.Environment.NewLine()"
--
cheers,
RL
"Andrew Morton" <ak*@in-press.co.uk.invalidwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Computer Guru wrote:
>I have a form I'm using as a dialog box.
It has default text that is two paragraphs.

It has a function setText(byval text as string)
that specifies the text in the read-only textbox that's on it.

For some odd reason,

dialog1.setText("Line 1" & chr(13) & chr(13) & "Line 2") shows up as
"Line 1Line 2" on Vista, and as "Line 1[]Line2" on 2k3, where [] is an
unprintable character.

The original text (default) shows up just fine.

using chrw() instead of chr() or 10 instead of 13 makes no difference.

Using + instead of & doesn't make a difference either.

Do you have any idea what is causing the enter characters to not show?
multiline is set to true.

You want vbCrLF, which is the same as Chr(13) & Chr(10), which is the line
end Windows expects.

Andrew

May 10 '07 #3

P: n/a

Andrew Morton wrote:
You want vbCrLF, which is the same as Chr(13) & Chr(10), which is the line
end Windows expects.

Andrew
Well, I tried chr(13) & chr(10) together, but that didn't work.

I've always used chr(13) or chr(10) by itself.......

Trying the other suggestion now though.

May 10 '07 #4

P: n/a
Computer Guru wrote:
I've always used chr(13) or chr(10) by itself.......
Then you have just been lucky to only use it with methods that accept
different kinds of newline combinations.

--
Göran Andersson
_____
http://www.guffa.com
May 10 '07 #5

P: n/a
On May 10, 8:28 am, Computer Guru <mqu...@gmail.comwrote:
I have a form I'm using as a dialog box.
It has default text that is two paragraphs.

It has a function setText(byval text as string)
that specifies the text in the read-only textbox that's on it.

For some odd reason,

dialog1.setText("Line 1" & chr(13) & chr(13) & "Line 2") shows up as
"Line 1Line 2" on Vista, and as "Line 1[]Line2" on 2k3, where [] is an
unprintable character.

The original text (default) shows up just fine.

using chrw() instead of chr() or 10 instead of 13 makes no difference.

Using + instead of & doesn't make a difference either.

Do you have any idea what is causing the enter characters to not show?
multiline is set to true.

chr(9) for tab works just fine, as do other characters.

Anyone see this before?
What does SetText do? Does it set the text of the read only text
box? Is the TextBox.Multiline property set to true?

Chris

May 10 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.