473,467 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Line Breaking

5 New Member
hi,

I want to move to the next line in the text box after reaching text length 70 characters can any one help me
Feb 24 '09 #1
4 1444
shweta123
692 Recognized Expert Contributor
Hi,

Try the following code in order to insert a new line in a text of text box:

Expand|Select|Wrap|Line Numbers
  1.             if (TextBox1.Text.Length == 70)
  2.             {
  3.                //check if no of characters in a textbox is equal to 70
  4.                 TextBox1.Text += "\n";
  5.             }
  6.  
Feb 24 '09 #2
Plater
7,872 Recognized Expert Expert
Well it would be "\r\n" for windows systems. ("\n" is used on linux/unix and "\r" is used on MAC I believe)
At any rate you could just use Environment.NewLine
Feb 24 '09 #3
artov
40 New Member
Plater: \r was used on older Macs. OS X is Unix, so it uses \n also.
Feb 25 '09 #4
Plater
7,872 Recognized Expert Expert
@artov
Learn something new everyday.
Feb 25 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: python1 | last post by:
Having slight trouble conceptualizing a way to write this script. The problem is that I have a bunch of lines in a file, for example: 01A\n 02B\n 01A\n 02B\n 02C\n 01A\n 02B\n
20
by: MickeyBob | last post by:
How does one detect the EOF gracefully? Assuming I have a pickle file containing an unknown number of objects, how can I read (i.e., pickle.load()) until the EOF is encountered without generating...
0
by: MarionEll | last post by:
--------------------------------------------------------- ************* Call for Participation ************** ************ Late Breaking News ************* *********** Extreme...
2
by: Gene Ellis | last post by:
Put simple I would like to have this line in my XSL template: document.writeln("<a href='http://www.mydomain.com/user/login.php' class='login'>") My XML parser seems to be breaking on the...
19
by: Philipp Lenssen | last post by:
I don't know the English word, but I'm referring to the double-dash which is used to separate parts of a sentence. I'm using — so far. Now I saw – which is slightly shorter. Some sites use --. ...
1
by: Marek Mänd | last post by:
<q cite="http://www.president.ee/est/ametitegevus/?gid=10628"> Kelleltki ei tohi veendumuste pärast võtta Eesti kodakondsust. </q><span class="quotereference">(Eesti Vabariigi põhiseadus, II...
28
by: Colin JN Breame | last post by:
Hi, Fairly new to C. What is the best way to read a line (\n terminated) from a file? Ive looked at fscanf but was not sure which format specifier to use. (%s perhaps). Thanks Colin
8
by: Steve Bergman | last post by:
As I study Python, I am trying to develop good, Pythonic, habits. For one thing, I am trying to keep Guido's the style guide in mind. And I know that it starts out saying that it should not be...
1
by: amohammad | last post by:
Hi All, This is Ali Muhammad, I am implementing the text editor for Phone in c/c++. I have completed this editor from all aspects , except the intelligent line breaking , can any one please give...
7
by: jeddiki | last post by:
Hi, I am using a function called htmlwrap() which states that it does NOT add a "<br>" to the 70 character line so that it forces a line wrap. ( the script safely wraps long words without...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.