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? 5 7661
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 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
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.
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eddie B. |
last post by:
Does anyone know how to do Chr$(13) in .NET?
Thanks,
Eddie
|
by: C L Humphreys |
last post by:
Hi,
I'm trying to concatenate address fields and insert a LF&CR after each line.
The SQL I use is based on
select
address1 & chr(10) & chr(13)&
address2 & chr(10) & chr(13)&
address3 & ...
|
by: jdph40 |
last post by:
I am trying to enter text to look like paragraphs in a text box on a
report, making it look like a memo. I enter (Chr$(13) & Chr$(10) &
Chr$(10)) to insert a carriage return and 2 line breaks, but...
|
by: lauren quantrell |
last post by:
Has anyone cunstructed a function to remove multiple carriage returns
and replace it with a single return?
Replace(mytext, Chr(13) & Chr(10) & Chr(13) & Chr(10), Chr(13) &
Chr(10)) ...
only...
|
by: MLH |
last post by:
I run the following command in main menu form open event code...
Me!MainMenuLabel.Caption = DLookup("", "qryAdminList") &
Chr$(10) & Chr$(13) & DLookup("", "qryAdminList") &
Chr$(10) & Chr$(13)...
|
by: Alberto |
last post by:
In a application in visual basic 6 I had chr$(13). How can I get the same
value in C#?
Thank you
|
by: crjunk |
last post by:
I have the following code in my web page.
Dim tmpReplace As String
'Giving tmpReplace the value from the textbox on the
webform.
tmpReplace = txtComments.Text.Trim
'Prevents report from...
|
by: Dan Nash |
last post by:
Lo,
In a previous version of an app, I used replace to convert multiline text
boxes to something easier to put in a database, and then i used
replace(chr(13), "<br>") when i needed to show the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |