473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

strings(seperation)

Hello!
I made a class(form) which is suppose to represent a message box.
I am sending to it constractor a string exc_str which is :

string[] exc_string = (string[])al.ToArray(typeof(string));
string exc_str=String.Join("\n",exc_string);

than I am trying to present this string in a text box but it presents
all the string together,not seperating it with "\n" although if I send
this string as a source to regular MessageBox - it is.

How can I do it in mine MsgBox which contains a text box to present
this string?
Nov 16 '05 #1
6 1433
I beleive it is due to the newline you are using.
Try:
string exc_str=String.Join("\r\n",exc_string);
\r\n is the Windows character sequence that signals a new line.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
Hello!
I made a class(form) which is suppose to represent a message box.
I am sending to it constractor a string exc_str which is :

string[] exc_string = (string[])al.ToArray(typeof(string));
string exc_str=String.Join("\n",exc_string);

than I am trying to present this string in a text box but it presents
all the string together,not seperating it with "\n" although if I send
this string as a source to regular MessageBox - it is.

How can I do it in mine MsgBox which contains a text box to present
this string?

Nov 16 '05 #2

Thanks but it didn't help. Maybe there is some other way to do it in
text box(bacause in MessageBox it works and in text box it isn't)?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
or you can use "Environment.Newline". And be sure to set the textbox's
multiline property to true to see it properly.

Ab.
http://joehacker.blogspot.com
"Dennis Myrén" <de****@oslokb.no> wrote in message
news:7t*******************@news4.e.nsc.no...
I beleive it is due to the newline you are using.
Try:
string exc_str=String.Join("\r\n",exc_string);
\r\n is the Windows character sequence that signals a new line.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
Hello!
I made a class(form) which is suppose to represent a message box.
I am sending to it constractor a string exc_str which is :

string[] exc_string = (string[])al.ToArray(typeof(string));
string exc_str=String.Join("\n",exc_string);

than I am trying to present this string in a text box but it presents
all the string together,not seperating it with "\n" although if I send
this string as a source to regular MessageBox - it is.

How can I do it in mine MsgBox which contains a text box to present
this string?


Nov 16 '05 #4
Hi,

I propose to use "Environment.NewLine" instead of "\r\n".

Marcin
I beleive it is due to the newline you are using.
Try:
string exc_str=String.Join("\r\n",exc_string);
\r\n is the Windows character sequence that signals a new line.

Nov 16 '05 #5

Thanks ,the multiline properie helped.

I also want the size of the text box be adaptive to the size of the text
inside(it breakes the line if text too long instead of increase its
size)?

Another question,how can I make the both scrolls visible in text box? (I
changed the scrollbars propertie of text box to both but I don't see
them)
Thanks a lot!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #6
If you set the WordWrap to False, the text will not wrap and you'll see the
horizontal scroll bars.
I also want the size of the text box be adaptive to the size of the text
inside(it breakes the line if text too long instead of increase its
size)?
increasing the size is not a good idea, but you'll see the scrol bars
instead.

Ab.

"juli jul" <ju******@yahoo.com> wrote in message
news:uh**************@TK2MSFTNGP10.phx.gbl...
Thanks ,the multiline properie helped.

I also want the size of the text box be adaptive to the size of the text
inside(it breakes the line if text too long instead of increase its
size)?

Another question,how can I make the both scrolls visible in text box? (I
changed the scrollbars propertie of text box to both but I don't see
them)
Thanks a lot!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Darryl B | last post by:
I can not get anywhere on this project I'm tryin to do. I'm not expecting any major help with this but any would be appreciated. The assignment is attached. The problem I'm having is trying to set...
2
by: Eric Lilja | last post by:
Hello, I'm working on my C++ homework and I have a question about the following function. It's part of my code the handles command line arguments. Here's the code: static void...
16
by: jcf | last post by:
I need to do the following: Our application builds information from a string that is stored in a buffer that can be any of the following formats: ABCD0102, ABCDEF0102, AB*CD*01*02, AB*CDEF*01*02....
4
by: Paul | last post by:
Hi still testing the idea of using html files for forms and then integrating this into a net app. I tried a small form with a button but noticed all I could do with the button is to right click and...
3
by: cuneyt | last post by:
Hi I am working on a class that reads parameter values from a configuration file and inserts them into a hash. There are many good dimplementations of this on the Web. What I would like to do,...
14
by: Shhnwz.a | last post by:
Hi, I am in confusion regarding jargons. When it is technically correct to say.. String or Character Array.in c. just give me your perspectives in this issue. Thanx in Advance.
3
by: drewski41 | last post by:
Hi, I'm Drew and I'm new here; and I could really use some help. I have a website in which I took offline because I found another host that will provide me with more space at a cheaper price. Before...
14
by: Naraendirakumar R.R. | last post by:
I have a client in the healthcare industry who would prefer to store the connection string in a centralized location in their Active Directory repository. Has anybody done this? What has your...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.