Line too long

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Darkone
    New Member
    • Jul 2006
    • 1

    Line too long

    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.T ext + "</description> <link>" + chwebsite.Text + "</link> <language>" + languagecountry .Text + "</language> <copyright>Copy right 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.harva rd.edu/tech/rss</docs> <webMaster>" + email + "</webMaster> <itunes:author> " + name + "</itunes:author> <itunes:subtitl e></itunes:subtitle > <itunes:summary ></itunes:summary> <itunes:owner>< itunes:name>" + name + "</itunes:name> <itunes:email >" + email + "</itunes:email> </itunes:owner> <itunes:explici t>No</itunes:explicit > <itunes:categor y text=""Technolo gy""> <itunes:categor y text=""Podcasti ng""/> </itunes:category > <item> <title>" + podtitle + "</title> <link>" + chwebsite.Text + "</link> " *THIS WAS ALL ON ONE LINE*
    [LINE TWO] <guid>soundfile </guid>"


    End Sub
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    well.. set the multiline properties to true.. give it a try.. good luck my fren..

    Comment

    • BSOB
      New Member
      • Jul 2006
      • 77

      #3
      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="w hen 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=fi nalstring

      Comment

      • candice
        New Member
        • Jul 2006
        • 11

        #4
        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

        Comment

        Working...