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

Line too long

P: 1
hey guys, i was trying put a really long line of text into a textbox (in code), but when i tried to put more in it automatically wrapped to the next line. how to i make it so the text on the next line will be a continuation of the text on the first line. (i dont mind if they're on two seperate lines in the actual textbox.)

here's my code:

Private Sub construct_Click()

[LINE ONE] RSSFEED.Text = "<?xml version=""1.0"" encoding=""UTF-8""?><rss xmlns:itunes=""http://www.itunes.com/dtds/podcast-1.0.dtd"" version=""2.0""> <channel> <title> " + chtitle.Text + " </title> <description>" + chdescription.Text + "</description> <link>" + chwebsite.Text + "</link> <language>" + languagecountry.Text + "</language> <copyright>Copyright 2006</copyright> <lastBuildDate>Fri, 23 Jun 2006 11:30:00 -0400</lastBuildDate> <pubDate>Fri, 23 Jun 2006 11:30:00 -0400</pubDate> <docs>http://blogs.law.harvard.edu/tech/rss</docs> <webMaster>" + email + "</webMaster> <itunes:author>" + name + "</itunes:author> <itunes:subtitle></itunes:subtitle> <itunes:summary></itunes:summary> <itunes:owner><itunes:name>" + name + "</itunes:name> <itunes:email>" + email + "</itunes:email> </itunes:owner> <itunes:explicit>No</itunes:explicit> <itunes:category text=""Technology""> <itunes:category text=""Podcasting""/> </itunes:category> <item> <title>" + podtitle + "</title> <link>" + chwebsite.Text + "</link> " *THIS WAS ALL ON ONE LINE*
[LINE TWO] <guid>soundfile</guid>"


End Sub
Jul 5 '06 #1
Share this Question
Share on Google+
3 Replies


sashi
Expert 100+
P: 1,754
Hi there,

well.. set the multiline properties to true.. give it a try.. good luck my fren..
Jul 10 '06 #2

BSOB
P: 77
multiline isnt the problem, the compiler just wont take the line. two ways to fix that:
1) use the _. the underscore tells vb that the next line is also part of this line. example:
RSSFEED.Text="when i get home i talk on the phone and eat food and watch television _
and walk my dog and do homework and make sure i dont have any run on _
sentences because that would just be terrible gammar on my part and i wouldnt _
want people to think i talked badly, y'know?"

2) use the & sign to append stings. 'and' tells the compiler to 'stick' this string on the other of that string. just like string=string1 & string2. this is the less favorable solution but if proformance doesnt matter then:

dim finalstring as string
finalstring = "when i get home i talk on the phone and eat food and watch television"
finalstring = finalstring & " and walk my dog and do homework and make sure i "
finalstring = finalstring & "dont have any run on sentences because that would just "
finalstring = finalstring & "be terrible gammar on my part and i wouldnt want people"
finalstring = finalstring & " to think i talked badly, y'know?"
RSSFEED.Text=finalstring
Jul 15 '06 #3

P: 11
Hi Thread,

My be use also can use the tool richtextbox in the component. then u need go to add in the component side.(crt+T) . This rixhtextbox is function as multiline.
some like the text box. easy to use
Hope my suggestion can help u . Good luck
Jul 17 '06 #4

Post your reply

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