Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2003
    Posts
    78

    Append text into paragraph

    Does anybody know how to append variable string into paragraph object ?

    Variable string as Line . . . one
    Variable string as Line . . . two
    Variable string as Line . . . three
    etc . . .

    How to put a kind of carriage return (enter) automaticaly
    after each line ?

    I must use paragraph for the transparent background.

    Thanks

  2. #2
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    strAVariableHere.."\r\n"
    Intrigued

  3. #3
    Join Date
    Aug 2003
    Posts
    2,427

    Just as a matter of interest.

    Label objects have transparent backgrounds and using concatenation is the way to produce a multi line label e.g.

    Code:
    str_content="Label line 1";
    for count = 2, 10 do
    	str_content=str_content.."\r\nLabel line "..count;
    	Label.SetText("Label1", str_content);
    end

  4. #4
    Join Date
    Sep 2003
    Posts
    78
    Intrigued, it really help me to get an exemple please. I'm not sure
    what to do with your code.

    Thanks

  5. #5
    Join Date
    Sep 2003
    Posts
    78
    This is the code i use:

    A button start this action:

    result = Dialog.FolderBrowse("Select folder:", "C:/");
    Paragraph.SetText("Paragraph", result);

    I need to click the same button again and append the next
    result to the paragraph object.

    Any help please ?

  6. #6
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by Fashion
    This is the code i use:

    A button start this action:

    result = Dialog.FolderBrowse("Select folder:", "C:/");
    Paragraph.SetText("Paragraph", result);

    I need to click the same button again and append the next
    result to the paragraph object.

    Any help please ?
    The " .. " that Intrigued and I mentioned concatenate (tack on to the end of) a string or variable to another one so if you change your code something like -

    Code:
    result = Dialog.FolderBrowse("Select folder:", "C:/");
    content = content.."\r\n"..result
    Paragraph.SetText("Paragraph", content);
    this will make the string " content " longer and longer and each \r\n adds a new line. N.B. you have to set the initial value of content somewhere so if for instance you put -

    Code:
    content = Dialog.FolderBrowse("Select folder:", "C:/");
    in your preload then that would initialise the string.

  7. #7
    Join Date
    Sep 2003
    Posts
    78
    Sorry Guys, i don't know why but it does'nt work . . .

    However, i finaly found this:

    result = Dialog.FolderBrowse("Select folder:", "C:\\");
    TextFile.WriteFromString("AutoPlay\\Docs\\Temp.txt ", result.."\r\n", true)
    result = TextFile.ReadToString("AutoPlay\\Docs\\Temp.txt");
    Paragraph.SetText("Paragraph", result);

    and it works great. A kind of paragraph update each time i choose and write
    a new folder to the list.

    "\r\n" seems to work with text file and not
    with paragraph !!

    Thanks

  8. #8
    Join Date
    Aug 2003
    Posts
    2,427
    The method works with both label and paragraph objects. The attached file has a label and paragraph side by side both of which display the concatenated string.

  9. #9
    Join Date
    Sep 2003
    Posts
    78
    Thank you guy, it works great !

Similar Threads

  1. help with ftp connect
    By CAI in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 09-29-2005, 07:13 PM
  2. Paragraph Text - format selective text?
    By tranquilraven in forum AutoPlay Media Studio 5.0
    Replies: 13
    Last Post: 05-12-2005, 05:40 AM
  3. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  4. Centred text in paragraph object.
    By longedge in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 09-22-2004, 11:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts